Reputation: 659
Ok, I have built an app using Phonegap for iOS which is working fine no problems, I am now moving this app over to Android.
This is more or less working, apart from the fact I have to re-do a lot of my CSS, I think I have to make is RWD. The background plugin I used for iOS was only built for iOS, so I removed it form the android build and built in a new one.
This seens all the work, app is working in the background fine, when you go back to it form the list of opened apps. However when you load the app, or re-load the app form the app link, it seems to reset/reload the app and wipe all the information from the screen?
The plugin I have moved to for my android app, is the one made by red-folder! I know its only listed for up to phonegap 3.1.0 and the phonegap version I am running is 3.3.0, could that be the issue? Or is this default android app behaviour?
All help most welcome.
Glenn.
Upvotes: 3
Views: 1085
Reputation: 2327
Set the preference 'AndroidLaunchMode' in your config.xml to singleTop
or singleTask
:
<preference name="AndroidLaunchMode" value="singleTop" />
source: https://cordova.apache.org/docs/en/latest/config_ref/index.html#preference
Upvotes: 1
Reputation: 11721
You have to modify the file platforms/android/AndroidManifest.xml, find the <activity>
tag and then set the parameter
android:launchMode
to "singleTop"
or "singleTask"
Upvotes: 4