How can I check if GPS is enabled before I try to use it

I have the following code and it’s not good because sometimes GPS takes very long How can I do the following: Check if GPS is enabled Use GPS if it is enabled otherwise use the network provider. If GPS takes more than 30 seconds, use network. I can do this with my own logic using […]

Difference between OnTouchListener and OnClickListener

I made an app which implements a View.OnTouchListener. But when I uploaded it to Android Market (Google Play Store), I got the following message: This apk requests 1 features that will be used for Android Market filtering: android.hardware.touchscreen I really don’t need a touchscreen per se. You could also “click” the view and this would […]

How to read window content (using accessibilityService) and evoking UI using draw over other app permission in Android?

My last question about the same topic was not clear enough and was put on hold by community and later it was automatically deleted. So, I am explaining that Question in detailed manner so that community can understand and help in a better manner. I want functionality similar to Voodoo App and MySmartPrice offers. Now […]

App not Ice Cream Sandwich compatible

I’ve developed an application for Android that cannot be download to Android ICS devices from the Market. Browsing the market with a 4.x device people see a “not compatible warning” and cannot proceed with the download. The app has a minSdkVersion setting of 7. It works well on 2.x and 3.x Android devices. I don’t […]

How to integrate paypal donate in android app?

How to create paypal donate button in android application and how to do the donation throw that please help me with some source code

FCM (Firebase Cloud Messaging) how to send to all Phones?

I have created a small App that’s able to receive Push Notifications from the FCM Console. What i want to do now is to send a Push-Notifications to all Android Phones that got the app Installed using the API. And this is where i got completely lost. Is there no way to send it to […]

How to use DataItem of Android Wear

I want to sync preference between handhelds and wearables. I implement sample code on handheld app. PutDataMapRequest dataMap = PutDataMapRequest.create(“/count”); dataMap.getDataMap().putInt(COUNT_KEY, count++); PutDataRequest request = dataMap.asPutDataRequest(); PendingResult<DataApi.DataItemResult> pendingResult = Wearable.DataApi .putDataItem(mGoogleApiClient, request); System.out.println(dataMap.getDataMap().getInt(“COUNT_KEY”));//print 3 And then implement below code on wearable app. But saved count can’t be retrieved. PutDataMapRequest dataMap = PutDataMapRequest.create(“/count”); int count = […]

Multiple Views OnTouch Events

We are developing an application where we need to capture MotionEvents from multiple views simultaneously. When we try to do so, Android only dispatches events to the first touched view and, when touching another view simultaneously, it gives us an ACTION_POINTER_DOWN on the first view only, even if the pointer coordinates are outside its bounds […]

Trying to run Android JUnit tests in Eclipse fails?

I have seen all the examples on the web and it seems real simple. I have a bare-bones app that displays a string. I have a a Android JUnit test project that I created when the app was being created (eclipse asked if I wanted to create a test app). When I run the test […]

Custom Android control with children

I’m trying to create a custom Android control that contains a LinearLayout. You can think of it as an extended LinearLayout with fancy borders, a background, an image on the left… I could do it all in XML (works great) but since I have dozens of occurences in my app it’s getting hard to maintain. […]

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