hide notification area progress bar in android when 100% is completed

I’m using this tutorial to show a notification with a progress bar. Everything works fine. But I can not make the progress dissapear when the task is 100% done How can I do this? tx

Connection with adb was interrupted You may want to manually restart adb from the Devices view

I am using Windows 7 and JDK 6. I downloaded the package of Android SDK with Eclipse and followed the instructions to create the first Hello World application. However, when I stand on MainActiviy.java and click on run I get the following error in the console: Connection with adb was interrupted You may want to […]

android how to rotate canvas rect

i create a rectangle in a specific size, and now i want rotate it to 45 degree, i used canvas.rotate, matrix, but not working. how is the proper way to rotate canvas in android? and i’m curios about Path.Direction.CW, is it used for rotation? but i don’t see any rotation function in Path() paint.setAntiAlias(true); paint.setStrokeWidth(2); […]

Android JUnit testing ClassNotFoundException

I’m trying to setup JUnit to test my activities for an android project. The Android Project runs ok on both an AVD and a device (there are still a few bugs left, which is why I want to add a few unit tests) I followed the steps from these websites (they are more or less […]

android httpclient.execute exception

When I test on simulator, it works, but when test with my device (galaxy s3), it keeps throwing errors, when during the following code: HttpResponse response; response = httpclient.execute(httppost); the exceptions: 09-03 08:16:49.018: E/AndroidRuntime(24254): java.lang.RuntimeException: Unable to start activity ComponentInfo{sg.dianping/sg.dianping.activity.ItemListActivity}: android.os.NetworkOnMainThreadException 09-03 08:16:49.018: E/AndroidRuntime(24254): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1970) 09-03 08:16:49.018: E/AndroidRuntime(24254): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995) 09-03 08:16:49.018: E/AndroidRuntime(24254): at […]

how to fix 22.0.1\aapt.exe'' finished with non-zero exit value 1

I was coding in android studio then this error will appear: cannot resolve symbol ‘R’ Error:Execution failed for task ‘:demo:processDebugResources’. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘D:\Android Development\sdk\android-sdk\build-tools\22.0.1\aapt.exe” finished with non-zero exit value 1 this is my Gradle: apply plugin: ‘com.android.application’ android { compileSdkVersion 22 buildToolsVersion ‘22.0.1’ defaultConfig { applicationId “br.liveo.ndrawer” minSdkVersion 21 targetSdkVersion 22 versionCode 1 […]

dynamically enable/disable hide/unhide Android ActionBar action icon

I am developing an Android application that employs a standard ActionBar. on a certain screen i have a Filter icon that is conditionally required, depending on characteristics of the data being displayed, e.g. some data is filterable Others not. i cannot find any methods on actionbar that look likely candidates for programmaticaly hiding an actionbar […]

Can someone explain how TrafficStats works its magic in the Android OS?

I’ve written a nice little Android app to check data usage, unfortunately it relies heavily on android.net.TrafficStats which was introduced with Froyo (Android 2.2). I’m attempting to back-port this class for my non-Froyo users, and what I’m able to determine from the Android source is: TrafficStats.java is just a native pointer to a c file […]

Possible to autocomplete a EditTextPreference?

Is it possible to have an EditTextPreference with AutoComplete attached to it? I know ho to attach one to an element with an id, but am having trouble figure out how to attach the ArrayAdapter to the preference field. This is wrong, but it’s as close as I can get. final String[] TEAMS = getResources().getStringArray(R.array.teams); […]

How to play online videos in Android?

I am developing a sample media player app in Android to play online videos, I have developed some code to play videos. It plays video from SD card very well, but I am facing two issues in this respect. 1- when I open the app for online videos it shows the video but it does […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.