Android :: Pressing Home Or Back Buttons From Main Activity / Causes App To Stop Unexpectedly

Nov 13, 2010

This is difficult for me to diagnose because the Log doesn't provide the offending code line that indicates what caused it.Running the app in the Emulator seems to work OK until I press Home or Back from the Main Activity. Using Back between the activities in the program seems to work OK, it only fails at the Main. I don't have the app finished yet so I haven't loaded it to a device yet.The Log says there was a null pointer exception so I would like to find why.The log points to the android routines (and I don't appear to have the source for those routines in the emulator-most but not all and these are refering to those I can't access). The log gives up at one point and says "11 more".It would be nice to see the remaining 11 in the hopes that one of them points to the line in my code that caused the offense.I'm looking for ideas on ways to find the error and hopefully cure it.

Android :: Pressing Home or Back buttons from Main Activity / causes app to stop unexpectedly


Android :: Activity State On Pressing Back And Home Button On Screen

May 6, 2009

Whenever I press the home button when Im in the root task of my application and when I click on the icon of my app again the state of my task (activity) is retained, but when i press the back button on the emulator and when I open my application its state is not retained. I want the state to be retained in both the scenarios.

In the mnifest I have given the below entries,

android:alwaysRetainTaskState="true" for the root activity

android:launchMode="singleTask" for the application

View 2 Replies View Related

Android :: Service Stop When Pressing Back Button

Mar 19, 2010

I created and binded a service in an activity and I would like to know how I can avoiding the android application to stop when I press the back button. When the back button is pressed the onDestroy method is called and I unbinded the service in this method. I try to prevent it by taking care of the back button event and manually call for onStop() method but it always called onDestroy after, why?

View 1 Replies View Related

Android :: Does Pressing Back Always Cause Activity To Finish()?

May 10, 2010

I've heard that pressing the back button will essentially cause the current Activity to finish(). Is this always the case? Seems like it would be with the way it pops the Activity off the stack.

The one situation I'm not so sure about is when the root Activity in a Task has back pressed. I'm currently experiencing a very weird effect, described as follows:

On loading my application, the first Activity is for initialization, and once it finishes, it calls my main Activity (a TabActivity). This first init activity has android:noHistory="true" set in the Manifest so pressing Back from my main Activity won't go back to that. It goes to the Launcher. When I click on my App in the Launcher a second time, the initialization activity loads again, and loads the main Activity when done. Almost immediately after, it loads a second instance of my main Activity. But ONLY after the Application has already been run once, and was exited by pressing BACK from the main Activity. It does it every subsequent time until I force quit the app or load a new version from the IDE.

Based on this, I am suspecting some kind of Activity instance is lying around and being reused, since it only happens on the second+ time I run the application (and exit with BACK -- using HOME just returns to the last state of the app, no big deal).

View 4 Replies View Related

Android :: Detect User Pressing Home Key In Activity

Feb 5, 2010

Can you please tell me how can my activity detect user pressing HOME key?

View 2 Replies View Related

Android :: Stop Following Activity If Home Key Or Pressed Back Pressed

Jul 8, 2010

I have a problem and that is my SplashScreen I have. It is built as an intro and after 3 seconds it shows the main menu of the program. Anyway, if I press down Back or Home button during the time the SplashScreen shows, it closes, but the activity I have chosen to follow after the SplashScreen will still run after the three seconds.

My code: **UPDATED CODE**

Handler ur = new Handler();
myRun = new Runnable() {
public void run() {
mainIntent = new Intent(SplashScreen.this,MyApp.class);
SplashScreen.this.startActivity(mainIntent);
SplashScreen.this.finish();..........................

View 1 Replies View Related

Android :: Don't Need Previous Activities Load On Pressing Back Button On First Activity

Jul 15, 2010

When i leave my app after pressing home button and then re launch it from menus it behaves in a strange way.Sometimes it launches the same activity on which i pressed home button.But sometimes it launches the first activity of my app. One reason for this could be that whenever system has memory shortage it clears any activities existing in But the strange thing is if i press back button from first activity it takes me back to the same activity on which i pressed home button and all other previous activities are also there(like if i press back button again previous activities also exist.)I haven't set any launching mode for any activity in my app(like single instance etc).What i don't need is that previous activities load on pressing back button on first activity.

View 2 Replies View Related

Android :: Need To Stop All Threads When My Main Activity Closes

Nov 3, 2010

Im wanting to stop all threads when my main activity closes as some are still running afterwards and are giving NullPointerException as they try to access Array Lists which no longer exist. however none of the obvious methods are working and they are also deprecated. is it possible as im currently using a try/catch statement as a workaround but would prefer a fix.

View 1 Replies View Related

Samsung Captivate : Change Home Buttons At Bottom Of Main Screen?

Aug 23, 2010

I have looked everywhere in the forums and although I know it is in here I can't seem to find the answer to this question. How do I change the home buttons at the bottom of the main screen? I have switched to k9 mail and would like to replace the stock email icon there.

View 3 Replies View Related

Android :: How To Come Back Main Activity From Child One?

Mar 30, 2010

I'm in a small problem.i have three activities (suppose A,B,C) after performing onclick event in activity A, i can go to activity B and then C..my question is that is there any way to comeback activity A from C..here is the code snippet public void on Create(Bundle Code...

View 3 Replies View Related

Android :: Sending Data Back To Main Activity?

May 28, 2009

I have two activity Main activity and child activity when I press a button the child activity is lunched. Still now I have no problem. I want to send some data back to the main screen. I used The Bundle class but it is not working. It throw some run time exception.

View 2 Replies View Related

Android :: Main Activity Grayed-out / Disabled On Back Button - Cause This Problem?

Jun 25, 2010

I have a problem on going back (clicking the Back button) from sub-activity to main activity: from my main activity I launch a new one (with passing some extras). code...

In the started activity I am getting data from extras and showing, etc. So everything works very well until I click Back button to return back to main activity. Then main activity appears but directly after - grays-out. I can't do anything there anymore... This "grayed-out" style looks something like there should be a dialog displayed, but there is no dialog shown, just the whole activity is pushed down/disabled instead...

One another interesting thing I noticed - that activity is still alive in background, because if I click "Search" button the Quick Search Box appears on top of my activity and if I click Back button then (to cancel it) - it disappears and my activity then becomes fully functional again (gray-out effect simply disappears...)

Tried watching logcat, but it shows nothing useful, no exceptions thrown, just this text always comes up:

W/KeyCharacterMap( 564): No keyboard for id 0
W/KeyCharacterMap( 564): Using default keymap: /system/usr/keychars/qwerty.kcm.bin

What could cause this problem?

View 1 Replies View Related

Android :: How To Clear Activity From Second Activity Going Back To Home Screen?

Mar 3, 2010

example scenario is: from login screen - main screen - then when i clicked a hide button the app will go to home screen, and when im going to click the app again the main screen would be called.

View 2 Replies View Related

Android :: Virtual/soft Buttons For Home - Menu - Back - Search - Always On Top

Jun 9, 2010

How can I make an app or maybe service that looks like (Nexus One touch buttons) for the navigation keys (Home, menu,Back, Search)

The buttons should always be visibly and always stay on top and send the command to the app thats running.

Someone have ideas and sample codes how to do that?

*I see an app with name (Smart Taskmanager) wich always detect when you touch the right side of the screen and then detect when you slide the finger to left.

So I think its possible, with this function I think its possible to implementate the code to simulate the (Home, Meny, Back, Search) buttons.

*I also see and test an app wich show a "cracked display" always ontop so that tecnic maybe shold be useful to always show the buttons/bitmanp on top.

Thoose function, to show the button and catch the "touch event" and send the event to the active program, thats what i dont can figure out how to do.

View 2 Replies View Related

HTC Eris :: Home Back / Search Buttons Won't Light Up

May 12, 2010

I upgraded to evil Eris and have found two problems: I am missing the market app, the light for the menu home back and search buttons won't light up and does mess me up.

View 6 Replies View Related

HTC Droid Eris :: Disable Home & Back Buttons?

Feb 18, 2010

Is there any way to disable the 4 buttons at the bottom of the screen? I forget if there's a term for them but the Home, Menu, Back & Search buttons? It's almost impossible to play some games because I inevitably hit them for a split second and I lose all my progress.

View 6 Replies View Related

HTC Desire :: Periodically Non Functioning Home & Back Buttons

Jul 23, 2010

For periods of time, my Home & Back buttons doesn't work on my Desire. Sometimes, they work perfectly without any problems. My menu and search buttons always work fine. Is it a loose connection that i can repair somehow?
It has never been dropped or damaged in any way. I've tried to find someone with the same problem as I, but with no luck.

View 3 Replies View Related

Android :: Stop Playback On Home Or Back Button

Sep 12, 2010

When I press back or home in my application, it hides, but the MediaPlayer keeps going. Is there a way to know when these buttons have been pressed and stop playback before closing?

View 2 Replies View Related

Samsung Epic 4G :: Menu - Home - Back And Search Buttons

Nov 10, 2010

I just visited the sprint store today and was testing an epic 4g and found that the bottom buttons were very unresponsive and I had to press them multiple times (sometimes up to 6 times) to get them to work. The guy working at sprint told me all the epic phones are that unresponsive. Is this true?

View 2 Replies View Related

HTC Desire :: On Screen - Soft - Home - Menu And Back Buttons

Jun 4, 2010

Does anyone know if its possible to have on screen buttons on the Desire for Home, Menu and Back as I'm (perhaps unnecessarily) worried about wearing the buttons out so would rather be using virtual buttons on screen (even if that means losing a little of the display area).

View 12 Replies View Related

Samsung I7500 :: Home Back And End Call Buttons Feel Springy

Sep 9, 2009

It's like a springy echoey feeling as opposed to the dpad, menu and answer buttons that feel quite firm by comparison? Is it just my phone?

View 7 Replies View Related

Sony Ericsson Xperia X10 :: Menu/home/back Buttons Not Responding

Sep 15, 2010

My girlfriend just got an x10 to match mine and for some reason every once and a while, the 3 buttons at the bottom completely stop working. At first I thought the phone froze but I could still use the on-screen keyboard and press whatever I wanted on screen but the 3 buttons wouldn't work oO This has NEVER happened with my phone.

After searching around a bit, I only found one solution which was "if you have a gel phone cover, take it off and see if it works." We tried that and it seems (so far, for an hour or so) that it's working fine. That doesn't make much sense to me as we have the same phone and the same cover - just a different colour. Anyone had this problem before? Should we be bringing the phone back or is there something I'm overlooking?

View 5 Replies View Related

HTC Incredible :: Adjust The Brightness Of The Home/Back/Search/Menu Buttons

Apr 29, 2010

Anyone notice that those buttons are really bright? Is there any way to turn them down?

View 8 Replies View Related

Sprint HTC Hero :: Creaking Sound Coming From Home And Back Buttons / Is This Normal?

Nov 28, 2009

Well have had my hero for around 3 days now. I have recently noticed a creaking sound coming from the home and back buttons. It rarely makes a sound from the menu or search button. But the home and back make this sound if I push the button or if I lightly press down (halfway pushing the buttons).

Is this normal? Do you get this on your hero?

View 3 Replies View Related

Motorola Droid X :: How Is Backlight For Menu / Home / Search And Back Buttons Supposed To Work?

Jul 17, 2010

How is the backlight for the menu, home, search and back buttons supposed to work?When should they come on?Sometimes they come on sometimes they don't, I really can't quite figure it out.

View 4 Replies View Related

Motorola Droid :: Ear Pressing 'buttons' While Talking / Fix It?

Mar 26, 2010

Recently my phone's screen no longer 'blackout' during a call so my ear keeps pressing the screen buttons. Anyone else having this problem? Annoying as hell!...

View 7 Replies View Related

Android :: Music Doesnot Stop After Pressing Backkey

Sep 23, 2010

I have an activity A which invokes Activity B on Button Click,and a Button click on Activity B invokes Class C. When button is clicked in Activity B , B calls a static method in Class C which passes its reference as one of the argument to method in C and other argument is path to the sound file that needs to be played. Once control reaches class C , Audio is played. But when Backkey is pressed Audio doesnot stop it continuous to play. How can I make the Audio to stop when BackKey is pressed. More over when Backkey is pressed control is coming to Activity A instead of Activity B. Can any one help me in solving this issue?Code...

View 1 Replies View Related

General :: How To Make Button-backlight Delay For 5s After Pressing Buttons

Feb 23, 2013

i focus my eyes on /sys/class/leds/button-backlight/, however, i can just turn off the backlight.

i found that the trigger in it can do complex work, so i tested it, and found some codes below

Code:
[none] rfkill0 mmc0 mmc1 mmc2 timer heartbeat sleep rfkill1 rfkill2 max8903a-usb-online max8903a-ac-online battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid

however, i haven't found the one i want.

View 3 Replies View Related

Android :: Leaving An Application By Pressing Home

Aug 14, 2010

I've recently been getting user complaints that when they leave my app by pressing the 'Home' key, my app continues to play sounds like it is supposed to, but when they go back to the app, a new one opens, but the old one is still running in the background. I have noticed this sometimes myself too, but only recently (my app has been on the market for a while now). I've done some testing myself and noticed that when a new instance of the app is opened after pressing 'Home' then starting the app again, pressing the 'back' key will go back to the original instance of the app that was opened. This means that the original instance of the app was not killed, but a new one was just opened over it. Has anyone else experience something like this?

View 5 Replies View Related

Android :: Service Running After Pressing Home Key

Nov 24, 2010

I have an Android service, created in OnCreate of first Activity of the application using StartService(). I need this service to be running throughout the life span of the application ie, all the activities in the application. But the service should not consume the resources after user pressed Home key or Back button. Is there any elegant way to do that other than stopping the service in onPause() method of all the activities?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved