Android :: Game Goes Blank After Pressing Home And Restarting
Apr 6, 2010
I am making an Android game with an Activity called Game, a SurfaceView called GameView and a Thread called GameThread. The Game's onCreate(), I make a new GameView, which makes a new GameThread, where all the game logic and canvas drawing is carried out. However, I'm having some lifecycle difficulties. When I press back and restart it, it works fine, but when I press home and restart it, all I see is a blank screen. Here are the GameView's onSurfaceCreated() and onSurfaceDestroyed(): @Override public void surfaceCreated(SurfaceHolder holder) {
mThread.mRunning = true;
mThread.mWidth = getWidth();
if(mThread.mWidth > 550) mThread.mWidth = 550;
mThread.mHeight = getHeight();
try {
mThread.start();
} catch(IllegalThreadStateException e).......
View 1 Replies
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
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
Feb 5, 2010
Can you please tell me how can my activity detect user pressing HOME key?
View 2 Replies
View Related
Mar 10, 2009
I want my application to resume what it is doing regardless of where I press the icon (Home screen, app picker, or running apps). Right now if my app is in the background and I press the icon on the home screen, the app restarts with my Main Activity. Once here, if I press the back button the app resumes from the activity it left off before it was put in the background. If it's running in the background and I hold the home button and select my app from the current running apps, it resumes correctly. How do I avoid my app from going to my Main activity when it is selected from the Home screen or app picker? I have tried adding the following in my Manifest XML file, but it doesn't help: <activity android:name=".Main" android:launchMode="singleTask" android:alwaysRetainTaskState="true" android: label= "@ string /app_name">
View 5 Replies
View Related
Apr 17, 2013
i have karbonn a21... whnevr i long press home button to switch between recent apps. phone hangs and no soft keys work. nd touch works slow. than i have to lock screen and unlock it again....than it works fine.
View 2 Replies
View Related
Aug 28, 2010
I had Launcher pro on there , but as much as a liked it , it wasn't as snappy as id liked it too be . But now that i have gone back to sense , hitting home restarts sense reloading all of my widgets for about 20-30 sec.
View 9 Replies
View Related
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
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.
View 2 Replies
View Related
Jul 9, 2013
I upgraded my Galaxy S2 (Straight Talk) to CM10.
Now whenever I press the home button, it brings up CM10's home screen.
How do I bind ADW to the home button?
View 2 Replies
View Related
Sep 27, 2010
Motorola Droid 2.2 Froyo rooted Bugless Beast 0.5. Randomly (Maybe 2/5) when I press home from the browser, an application, ending a call, etc. All of my icons will disappear for 4-5 seconds. Please tell me if you know of a fix or anything about this problem, I've seen other topics about this but no solutions that worked.
View 9 Replies
View Related
Aug 3, 2010
I am tonight at a party and a good friend asked to use my phone for the music I've got on it (16g class 4 SDHC updated twice a week ). I after a long conversation of "If you break my sh-- I will have to kick someone's butt." I gave it to her and she plugged it in. Long story short, somehow it was knocked off the table and into a puddle of what I will, for lack of a better word, call fluid. I assume it was beer but still am unsure. Now, I've dried it out using the "Rice Trick" and leaving it on top of the heater vent, put the battery back in turned it back on and the screen was totally un-responsive. I tried a battery pull to see if that would fix it, but to no avail, it was still un-responsive. I then tried the factory reset (Home+Back+Tap Power>Clear>Reset). Now when the phone boots up and everything loads, Navigator will load and start up all on it's own and when I press the Home button Navigator starts up again. Tried the factory Reset again and the same problem. I was going to just re load the 2.27.651.5 from sprint (I never deleted it from my PC when it first dropped) but when I connected my Hero to my PC it wouldn't detect the Hero, It would charge, but not Mount/Sync/Share.
View 12 Replies
View Related
Sep 12, 2013
I have played multiple games with no issues for years. Now the Play Games application appears so I started using it. A few weeks of use and now my leaderboards & achievement windows are blank in the play app and instantly close in games.
I have tried clearing cache of apps and services & uninstalling and reinstalling some apps. Is there a fix for this?
View 5 Replies
View Related
Oct 31, 2010
So I have had my Evo for about 2 weeks, and all of a sudden when I am in an app, then hit the home button, I am presented with a blank home screen for sometimes up to 15 seconds then all of my widgets and icons appear. It is actually quite annoying now that it is doing this almost every other time I go back to the home screen. It even happens when I hit the back button sometimes to get back to any one of my 5 home screens.Has anyone else had this issue?
View 9 Replies
View Related
Jun 4, 2010
On the Desire home screen I have a clock with what should be the weather info underneath which is the standard home screen.The weather info is blank apart from the name of a nearby village which i believe is where the nearest phone mast is located. (the picture on the box the phone came shows Barcelona with lots of weather info).If I tap on the blank area next to whe name I get the weather screen opening up with the name of the village where the mast is, and the word "current" in brackets next to it and the info is all showing "0" if I update it the message appears "no weather data available".I can chose another location (various pre loaded or choose Manchester UK by searching ) then choosing my desired location which then shows data.When I return to the main desire home screen the village name is back under the clock with no weather info.I guess the HTC is trying to get the weather data for the mast location nearest my phone as a default setting, I dont know how or if I can override this so that I can have my desired location (ie Manchester uk) wether data showing under the clock on the home page permanently.
View 11 Replies
View Related
Mar 31, 2010
Over the past couple of months, the home screens on my Hero has sudden gone completely blank (i.e. all widgets disappeared!).
Have anyone else experienced this?
View 3 Replies
View Related
Apr 2, 2014
is there anyway to prevent this from happening? some sort of system lock i'm missing?
View 1 Replies
View Related
Oct 11, 2010
So last night I went to change my battery and when the phone booted back up, a lot of programs were not installed anymore and I was getting about 3 other programs that were force closing right away when it came on.I tried to reinstall the apps, but I was still getting some force closes and general funny stuff going on.So I factory reset it and started from scratch again today. I got most of my apps reinstalled and thought it was fine. Then just a little while ago, I noticed that I couldn't browse the Internet or use the market. I rebooted and it was fine.A little while later I went to use my phone to make a call and when I unlocked it, all my home screens were blank! Reboot again and that fixed it.
View 10 Replies
View Related
May 30, 2010
So I like to keep a picture widget on my home screen but I keep getting four black/blank pictures showing up.... seems a cache folder with the blank pics is the culprit any solutions?
View 3 Replies
View Related
Jul 31, 2010
My phone would be in my pocket, but if I were to take it out and check my mail, the screen would be blank. I would see the wallpaper and the 3 icons on the bottom of the screen (phone, application drawer, and contacts). It'd lag for a bit before things show up. When I say lag, I mean a pretty significant lag.
View 7 Replies
View Related
May 17, 2010
I just bought this phone off of CraigsList.When I try to launch the camera, whether using the dedicated camera button on the side of the phone or using the icon on the screen, the display goes blank for one second and then goes back to the Home screen.I called Tmobile, and they just had me do a hard reset which didn't have an effect.
View 4 Replies
View Related
Oct 14, 2010
I'm running Launcher Pro and only have one home screen.Earlier my phone was locked and I hit the unlock button and there is no unlock puzzle piece. The capacitive buttons don't work, I can't pull down the menu, but the screen is there.So I reboot.It works fine for a few mins but next time when I unlock all the icons are missing from my home screen except the 5 dock buttons.Capacitive buttons are fine, menus work fine, even the app drawer.I went to task manager and killed Launcher Pro and restarted it and everything was back, but I've never had a lick of trouble with it before and suddenly it starts.The only thing I can think of is that a little while ago I went under preferences and hid several of the apps from my app drawer (many of which are on my home screen) but I wouldn't think that would adversely effect function/stability.I've been running LP for over a week and it's not given me a luck of trouble before this, and then two issues in under an hour? Any ideas?
View 7 Replies
View Related
Oct 9, 2010
My 3 year old loves playing the puzzle game. Great way to entertain her for 20 minutes. But I really gotta watch her. She was just playing and hit the home button was still trying to move a shape but brought up the recent calls list and dialed my boss! She doesn't mean to do it, but her hands are small. So, is there a way to lock those buttons while she's using the game? It would be nice Or would it be more of an individual app feature that I'd need to contact the developers for the feature request?
View 2 Replies
View Related
May 17, 2010
I just updated my eris with the new 2.1 and downloaded the homerun 3d game. It doesn't seem to work. does this happen to your eris at all?
View 1 Replies
View Related
May 22, 2010
I have a square grid, for a turn based game ( grid is similar to the chess board ), but the moves in the games are different based on whether you have lapped your opponent pawn at least once or not.i.e if you have not lapped (beaten any of the opponents pawns) in the outer most grid as below.if you have lapped your opponent pawn once at least, then you get to reach home,this way.Any player having all his pawns reaching "home" first wins.The ones in yellow are safe-houses, i.e both the opponent pawn and the player's pawn get to stay in the same grid, this is not considered to be lapping ( the opponent ).The lapped pawn will return to its start point.Now the question is, what is the effective way to store the paths for the all the pawns.we will have 4 pawns for the player and 4 opponent pawns.Is there any pattern to store such static information, in a elegant way?
View 1 Replies
View Related
Nov 12, 2010
I have a puzzle game with a 7x7 grid of graphics, and a timer, its just about ready to go. But I am stuck on how to go about saving/continuing game. For example when someone exits I want them to be able to save and exit, then come back and click continue to pick up where they left off with all of the graphics in the right place, timer and score. I looked at onSaveInstanceState android examples, but not sure if this is what I need or how to implement it in my case.
View 8 Replies
View Related
Feb 21, 2010
How can I start my android application after pressing particular key?
View 3 Replies
View Related
Oct 18, 2009
I found that if I keep pressing the touch screen, the app will slow down very much. Both happened in my code and the sample app.
The same issue happened to me on Windows Mobile, but not happened on Symbian. Anybody have some clew to fix it?
View 5 Replies
View Related
Mar 11, 2010
I use my phone as an audio player while outside with a bluetooth headset. I have the phone in my pocket. However,it seems very easy for the side buttons to be pressed, even when the phone is locked. What do you all do for this? I have tried a couple things and did find a "solution", but it's not one that I like, and would appreciate hearing thoughts from others.
View 4 Replies
View Related
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