I made my own application, everything works fine when I debug my application from debugger, but when I create the package for release or when I upload the app on Google Store, something goes wrong.
When I launch the application from the home launcher, my app restarts from MainActivity but when I launch the app from desktop, everything works fine. It seems like there is an android bug, I can't figure it out. It happens only when I put my app on the Store.
The steps are:
- Install application from the store.
- Open the application.
- Put the application on background.
If I reopen the application from the Launcher ( Home ) the application restart from MainActivity ( the app is no destroyed! ), if I reopen the application from the Desktop, everything works fine and the application open the last activity that I opened.
Can anyone help me?
[Update 1]
This bug is present if i create a package and i install the application with AirDroid, everything works fine is i deploy the app directly from Xamarin. This is insane.
[ Update 2 ]
I Tried to create a new project with just two activity, MainActivity and TestActivity. MainActivity launches TestActivity when a button is pressed, if I put the app on background and resume it with launcher, this always restart the app from mainActivity with OnCreate Method called!
This is only when I create a package, when I work on debugging, everything works fine.
Where I'm wrong?