onResume being called over and over while phone screen is locked

It appears that if an activity is in the foreground while the phone’s screen is locked, broadcast events and/or wakelocks will cause that activity’s onResume to be called, whether they were intended for your app or not. This happens even if you don’t interact with the phone in any way. Don’t unlock it, don’t touch […]

Draw path on google map based on lat lang

i want to draw path on google map. Basically what i am tracking user locaion after specfic time interval. when user reach to some destination then i need to draw the path which he followed to reach that destination. It is working fine but the problem is it is showing zigzag path. See the image […]

Transparent WebView not working on Android v4.0

Some background to this question is here. It relates to working around a known bug in Android where the WebView background needs to be transparent. Android WebView style background-color:transparent ignored on android 2.2 It involves a WebView, hosting an HTML document with a transparent background, so the WebView is transparent and the HTML document can […]

Latest Apache HttpClient in Android SDK

Android SDK 4.0.3 is currently packaging Apache’s HttpClient 4.1.1 library. I need to use some functionality which is there in the latest HttpClient 4.1.3 only. – Is there a way I can update my SDK? – Where can I know if there are any plans in the future SDKs to package the newer HttpClient? – […]

Twitter Bootstrap Dropdowns Unclickable On Tablets

On the menus for our site we have a button dropdown for user account options that changes dynamically based on their username and logged in status. It works great in the browsers, however, on Android tablets(using Firefox) we can’t seem to click any of the links in the dropdown, although the links DO appear, whenever […]

Installing APK from email attachment

Whenever i send a .apk file via email as an attachment and then open the .apk-file in my phone from my email-account, i get a parsing error. However if i put the .apk on my website and provide a URL to it, it works like a charm. A bug? Just me? Am i doing it […]

How do I suppress warnings when compiling an android library with gradle?

In my application I have a library developed by a 3rd party that unfortunately contains quite a few lint and javac warnings. I’d like to ignore both these types of warnings since they can’t be fixed by our team and they are polluting our build logs. I have tried adding the following to the libraries […]

How to textView.setText from Thread?

I need to set text to textView from thread. All code is created in oncreate() something like public TextView pc; oncreate(..) { setContentView(R.layout.main); pc = new TextView(context); Thread t =new Thread() { public void run() { pc.setText(“test”); }}; t.start(); This crashes my app. How can I set text from thread?

does ParseImageView cache ParseFile

Does ParseImageView cache ParseFile’s in Android. If it caches parseFile, How can i find the path of those files in my android device. ParseImageView imageView = (ParseImageView) findViewById(android.R.id.icon); // The placeholder will be used before and during the fetch, to be replaced by the fetched image // data. imageView.setPlaceholder(getResources().getDrawable(R.drawable.placeholder)); imageView.setParseFile(file); imageView.loadInBackground(new GetDataCallback() { @Override public […]

Keeping app GCM registration ID valid robustly during automatic updates

In the official docs and this question, Google recommend re-registering GCM because the registration ID could change. One hypothesized way it can happen is that during update, the all is uninstall and then installed. If a GCM notification is received during that gap, NotRegistered could be returned and the GCM registration ID could be invalidated. […]

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