Ok i can replicate this all the time now with these steps:
Open the app then press back which takes me out the app.
Open the app up again and just after the splash page i get black screen and freezes.
On back press i call finish(); is this correct way to terminate the app? I can only assume something's not getting closed properly first time round and causing app not to load properly when i reopen it.
Anyone heard of this before?
Related
Since the new Android Splash Screen API for Android 12, the back button is no longer responsive while the splash screen is showing, it looks like the UI thread has taken over completely and there is no way I can reenable the back button, this is a problem, for example, if a user accidentally opens the application, he normally clicks the back button and it's solved immediately the app closes, (or at least that was the behavior of my app before this new API), but now this a bad UX.
So I'm wondering if you have found a way to solve this and enable the Back button while the splash screen is showing while the data is loading?
I have tested many tutorials and I have downloaded the source code, and in all of them, the back button is not responsive.
For example this one:
https://github.com/philipplackner/SplashScreenAndroid12
Thank you for your help, it's really appreciated.
I have developed an app using xamarin forms. everything works fine. but the problem now is whenever I launch the app on an android emulator or on any android device, it runs. but then when it's idle for a few seconds, say 15secs,
it stops displaying. the screen goes blank(it displays a white page with nothing on it). then I have to close the app and reopen it for it to continue displaying. what could possibly be the cause?
if I launch the app and I click all the buttons fast enough, the app keeps working but if I delay, it then hangs. No more frontend display.
I have some problems to my app and I don't have any idea to fix that.
I open my app and use it for a while, then I let my app run in background which means I don't close it and use my phone do other things.
But when I want to use my app again, I found that my phone becomes very lag. When I click background app button to show which app is running in background, my app jumps to screen very lag, and when I want to click it or want to close it, it will very lag too, which means maybe my app make my phone become lag.
This situation only happen when I want to open my app again or I want to slide out my app to close it. When my app is running in background and I do other things, my phone will not lag.
I don't konw what happend to my app, can anyone tell me how can I check my app,
and know what happened that I can fixed it, thank you!
Check in your application code that you have not put a heavy task on onResume() method. If possible try to take that execution in appropriate life cycle method.
Put a break point on method which is call when the application got visible and try to find out that if any function is not taking much time to execution.
When downloading and installing my app from the Play Store, I have the following issue:
After I start the app for the first time I get into my LoginActivity (which has intent-filters MAIN and LAUNCHER), I log in and then start my MainActivity, that has a HomeFragment with a green button. On Button press I hide the green button and show an orange button. If I now press the 'Home' Button, the Device goes to the home screen, then animates to a page where there is space for a new app icon and adds the icon of my app, animated (since it was a fresh download). If I now click on the icon to re-open my app, I get back to my MainActivity and HomeFragment, however the UI seems to be the way as if the Fragment was just created (green button is visible, orange is hidden). If I then press the back button, the Screen seems to close, behind it appears my "old state" MainActivity/HomeFragment, but then the UI quickly changes back to the green button, if I then press the back button again, I leave the app as expected. If I kill the app and restart, this issue no longer occurs, instead the the behaviour is as expected (when pressing home button and reopening the app, the UI is exactly how i left it).
This issue does occurs on my Nexus 5, Android 6.0.1. When going through the same steps described above on a Genymotion Virtual device (Galaxy S3, Android 4.4.1 with play services installed) I do not have the issue, the app is behaving correctly.
This issue never occurs, when I deploy from Android Studio.
Any ideas? what the issue could be?
I have added android:launchMode="singleTop" to my MainActivity in manifest, without success.
Obviously the is also hard to debug, since it does not occur when I deploy from Android Studio (even if I uninstall the app first), so I have to submit an update to Play Store first to see results of changes.
i have a Phonegap and JQM app.
Problem is, if I switch to another app and then back to my app, App is completely reloaded and start again.
Is posible this disable?
Thanks for any advice.
This is happening because there is a lack of memory for the app to run. So as soon as u go to home the app dies and on opening again it reloads the app from the start. To confirm that this is indeed happening i would suggest that you close all running apps on your phone and then run your app. Im sure it would run properly even after switching to home screen and coming back.I don't think its possible to get around this behavior. Design your app so that it has a small startup time so that its usable even on phones with less ram where such problems would come.