Tag: android-activity

Starting an Android Activity from a static method

I want to start an activity from a static java method on an android device. I do not have any context or anything passed as parameter to the static function. For starting the activity I must call “startActivity” with the current running method as “this” pointer. So is there a way to get the current […]

Android application update issue

Recently I have been facing the problem of my android app update process. In brief, app is able to check if update with higher version code was uploaded on server. If so, user decides whether to update. After that app is loaded and standard installation begins: final Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(new File(PATH_TO_APK)), “application/vnd.android.package-archive”); […]

Can DataBinding interfere with localizing an Activity?

TL;DR I have an app that supports a number of languages. One activity isn’t being translated despite using all the usual localization methods. It is the only Activity in the app that fully utilizes DataBinding. Full explanation I have an Activity that uses DataBinding. So basically, entire XML layout for that Activity is wrapped inside […]

ANR in random usage of application

I have an VOIP application and the engine part is C(NDK) Level.On random usage of application i end with an ANR pointing to ” at android.os.MessageQueue.nativePollOnce(Native Method)”. Using android-ndk-r5 ANR Traces: —– pid 13735 at 2013-05-23 15:56:47 —– Cmd line: com.myapp.voip DALVIK THREADS: (mutexes: tll=0 tsl=0 tscl=0 ghl=0) “main” prio=5 tid=1 NATIVE | group=”main” sCount=1 […]

save/restore state of android webview

I have a simple webView app which loads a page from our site with locations and phone numbers that our field guys are supposed to visit each day. It provides a hook to launch navigation or dial the phone. When returning from the outside activity, the app is crashing. Hitting the phone’s home button then […]

onBackPressed to kill a handler within an activity – Android

As you can see, I have this PlayLesson_01 activity which displays images and audio at the same time. This activity has two handlers, one to control images and audio, while the other one will finish the lesson and goes back to previous activity (Lessons Menu). Goal: Click on hard Back button to go back to […]

Difference between ActionBarActivity and Fragment Activity

I am noob in Android. I just started to use ActionBarActivity over FragmentActivity. Is there any difference between them ??

What error this points to – “new_window_surface returns 0x3000”

In my activity, I want to create an independent surface (not linked to existing activity window) and show some content in it. I mean this window should come on top of my existing activity window). When I try that, I get this message in logcat: D/mali_winsys( 119): new_window_surface returns 0x3000 And my window is not […]

Google + Sign In: Activity won't start

I am using com.actionbarsherlock.app.SherlockActivity in my project. When I try to start another activity where I will need to do a Google+ sign in this error occurs. I am getting this error on an actual device, not the emulator. What do you think I am doing wrong? Error 05-12 15:58:12.487: E/AndroidRuntime(24310): FATAL EXCEPTION: main 05-12 […]

How can I start new activity as an expended circle from center

This question already has an answer here: Circular reveal transition for new activity 5 answers

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