I've created a sample application (just a textview, nothing else), and I noticed a bug.
After installing it from the SDCard, it displays the "Application installed" screen, with the done and open buttons.
If I click the open button, a strange thing occurs:
Whenever I put the application in background and reopen it from the application icon, it doesn't reopen it, it creates a new instance.
I can confirm that it is creating a new instance, because after putting it on background and reopening a few times, when I click the back button, it opens the previous instance, instead of returning to the home screen.
Now the strange thing is that it only happens after installing from the SDCard and clicking on the open button.
If I click the done button (or installing via ADB) and open the application via icon, it doesn't happen.
Also, if I click the open button (and the bug occurs), after the application is ended for the first time, the bug doesn't occurs anymore.
I've tested it in different devices and in different Android versions (GB, HC and ICS), and the bug is reproducing in them all.
Does someone know if this is an known issue from Android and if so, does someone have an official reference that I can refer?
Thanks in advance
Yep, it is a nasty, well-known Android bug that has been around since the very beginning. See the following:
Android issue 26658
Android issue 2373
Android app acts differently installed from adb vs sdcard
Related
My Android emulator crashes whenever I press keys on the pc keyboard or hit the emulator side buttons. the only part that works is the emulator mobile screen. This doesn't happen to just one device but to all emulators I use. This is really annoying cause whenever I press any key on the keyboard while the emulator screen is active it will instantly crash. But keystrokes won't crush it when text input is active on the emulator screen. The operating system I use is ubuntu but Windows fix is also useful.
I need help from someone who has managed to solve this problem before.
I'm pretty sure I got this error before too. Whenever I pressed a button, the emulator would just say "Saving State..." and just closes. The only solution I found to fix this was to delete the emulator and create a new one. It's not the most effective solution, but I couldn't find any other solutions.
Really weird issue but when I try to click once it doesn't register on the emulator but then I click again and the click registers. This is using AVD. Every other click seems to trigger in the proper place. This has nothing to do with my app just base image.
Take a look at this:
https://www.youtube.com/watch?v=axvxtGj4HPo&feature=youtu.be
and notice the first click doesn't register.
I notice the age on this thread, so not sure if you have already figured this out. I ran into something similar like this today in which no clicks were being registered at all. This issue still persisted even after closing and reopening the simulator. One thing I did notice is that the power button still worked.
I ended up fixing this by:
Clicking and holding the Power Hard Key
Restarting the device OS by clicking the Restart
After the OS Reboots, everything seems to work again.
Note: the Hard Key for power is the power button next to the volume controls on the right.
In my case it usually happens when the size on disk is very high (see in AVD Manager) and the solution in my case is to make a Wipe Data
Update #1 (Because the solution from above not always works)
Another thing I found is that when you want to swipe up from the Google bar does not open the apps menu. Then I open first the Messages app or Chrome and close again. From there the Swipe up works again.
i am new here, but i checked the site, it does not contain my question, hence not duplicate. Actually, in my android studio v 1.1.0, emulator does not launch default activity automatically when started in android studio. What i mean is that when i click the green (play) button to run my project, my emulator is launched. When it loads and is ready to be unlocked, after unlocking my default activity should run automatically but it does not. Just The Home screen is shown no matter how much i keep waiting. No error reported in LogCat, neither any exception or anything wrong with code. So to run, I have to right click on my activity and click run MainActivity from the available options. So, how do i make the emulator automatically launch my default activity?
Like the title says, whenever I make any changes in the code I don't see the changes in the AVD. Is there a way to do this without closing the AVD and starting it again?
I'm using Eclipse.
Thanks!
I have noticed this behavior at times as well. In the ADB log it will state something like the activity is already started and has been brought to the front even though it was already on the screen. Not sure what the cause of this behavior is and it seems to happen randomly. I have dealt with this in the past by force stopping the app in the AVD or just uninstalling it. Sometimes pressing the home button on the AVD and then running the APP from eclipse seems to fix this.
This is the second time this has happened to me now. I changed the starting activity of my app, and put out an update, and now the icon on people's phone will not open my app. The only way they can open it is through the downloads section of their Android Market app, or if they uninstall and reinstall the app, causing them to lose ALL their data.
I have no problem with updates on my N1, but every other Android phone has a problem with this. Why?
The only way they can open it is
through the downloads section of their
Android Market app, or if they
uninstall and reinstall the app,
causing them to lose ALL their data.
Powering their phone off and on should work as well.
I have no problem with updates on my
N1, but every other Android phone has
a problem with this. Why?
It's a question of when the home screen app elects to reload its launcher data. Different home screen implementations handle this differently. You will have the same problem with any user-created shortcuts and the like.