Tag: android-activity

Why would Application sometimes restart on killProcess?

Ordinarily, exiting my application by calling: android.os.Process.killProcess(android.os.Process.myPid()); performs well without incident. But every once in a while, the application will restart again (after exiting!). The relevant log snippet shows: .631: I/Process(15495): Sending signal. PID: 15495 SIG: 9 .641: W/AudioFlinger(121): write blocked for 252 msecs, 1279 delayed writes, thread 0xdc18 .651: I/ActivityManager(164): Process com.ef.myapp (pid 15495) […]

Android, NoSuchFieldError when launching second activity

I have two applications and am turning one into a Library so I can launch it from another application. In my library I have a facebook image and a twitter image that causes the NoSuchFieldError. I have the library defined in my manifest. <activity android:name=”com.funayman.listactivity.ApplicationListActivty” /> I am starting this activity using startActivity(new Intent(this, ApplicationListActivty.class)); […]

Android: Keep MediaPlayer running during Activity screen orientation update

I use a MediaPlayer to play an MP3. Currently I disabled screen orientation changes by using android:screenOrientation=”portrait” android:configChanges=”keyboardHidden|orientation” in the manifest. I do want to support landscape mode now – i.e. removed those tags – but have the problem that during the destroy/create cycle the player gets stopped and then restarted. This is okay and […]

Android app with multiple activities

I have a very simple game that consists of only one activity, and I want to add a title screen. If the title screen is another activity, what changes do I need to make to my manifest file to make the title screen open first? The gameplay activity is called Leeder, and the title screen […]

Single XML, Multiple Activity & there Performance

I have some simple questions for Android Users. If I use Single XML for Multiple Activity, What issues might come ?? How it ll help in Application PERFORMANCE, if we use this kind of approach ?? for example : If have same XML layouts A,B,C for A,B,C Activity, Instead of using multiple layout I want […]

Why is onAttach (Activity activity) deprecated?

After updating the SDK to API level 23, I found that onAttach (Activity activity) is deprecated and the new method is onAttach (Context context). can any one enlighten me on why this change was made?

Test run failed: Instrumentation run failed due to 'Process crashed.' when testing multiple Android activity

I’ve got an issue with testing my android application. I have 2 testCase class, if I execute them separately, there is no problem, the tests run until the end. But if I do “right-click” on my test project and choose “Run as Android Junit Test” I’ve got a message Launching instrumentation android.test.InstrumentationTestRunner on device emulator-5554 […]

Weird behavior of activity orientation change in android

I am facing very strange problem in handling orientation of activity. Let me explain the scenario I have Activity A and B.Currently A is in landscape mode and B(fixed) is in portrait mode. I am saving state of activity A if user change orientation of A. I went from A (landscape) to B(portrait) so in […]

Override OnResume() method of all activities Android

I have and app with more than 10 activities and I would like override the method onResume() with the same code in all of them. I know that I can override this method in each activity, but I’m looking for an efficient solution. Moreover I would like inside this onResume show a message depending what […]

Android Lollipop Activity Screen corrupted

This question already has an answer here: Android SystemUI glitches in Lollipop 6 answers

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