I am using XWalkView to display a mobile website as an application. My problem is when the application goes into the background and returns, it reloads the page that it shows. I want to save his state and continue from this state when it comes from the background. Here is my code:
public class MainActivity extends AppCompatActivity { static final String URL = "https://www.biletdukkani.com.tr"; static final int MY_PERMISSIONS_REQUEST_ACCESS_LOCATION = 55; static final String SHOULD_ASK_FOR_LOCATION_PERMISSION = "shouldAskForLocationPermission"; static final String TAG = "MainActivity"; static final String COMMAND = "/system/bin/ping -c 1 185.22.184.184"; static XWalkView xWalkWebView; TextView noInternet; static Bundle stateBundle; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.d(TAG, "onCreate");
I also tried adding the following lines to the manifest, but didn't work.
android:launchMode="singleTask" android:alwaysRetainTaskState="true"
How can i do this? Thanks for overcoming.
source share