Tag: android

Edittext android automatic focus

I have an issue when the activity starts, android automatically places focus on the first edittext. How do I prevent android from doing that?

Android: How to know if an activity is finished?

I’m working on an app that plays mp3 files automatically and in succession from within a given activity. it knows when the current mp3 play is completed by listening for an “onCompletion” event from the MediaPlayer. However, if I return to the start display by pressing the back button while media is playing, apparently the […]

How to get current network usage of app (or in total), even on Android N?

As the title says. I wish to know how many bytes per second a specific app use at specific time. Maybe I can use “netstat” command? But if so, how can I filter it to a specific app/process ? Do I also need to have some permission to do it? Currently people say to use […]

Check if gps is on In Kitkat (4.4)

Below kitkat, I get if gps is on with providers list String providers = Secure.getString(context.getContentResolver(), Secure.LOCATION_PROVIDERS_ALLOWED); if (TextUtils.isEmpty(providers)) { return false; } return providers.contains(LocationManager.GPS_PROVIDER); But in kitkat, Secure.LOCATION_PROVIDERS_ALLOWED is deprecated. Javaodc say “use Secure.LOCATION_MODE”, Location modes are belows… Secure.LOCATION_MODE_OFF Secure.LOCATION_MODE_SENSORS_ONLY Secure.LOCATION_MODE_BATTERY_SAVING Secure.LOCATION_MODE_HIGH_ACCURACY But i do not know exactly below code is correct. (I do not […]

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 […]

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