There are 3 states that an app can be in : 1. Foreground. 2. Background(minimized) 3. Completely closed( removed from list of active applications)
This is the way I've done it : 1. Forground/Background -> onMessageReceived(RemoteMessage remoteMessage) is where I get all the messages which I further parse.
- Completely closed -> Intent processInputIntent = getIntent(); int id = processInputIntent.get("id"); // I fetch all the parameters this way. This method works if I don't do the following changes in the manifest.
The issue is my app is a complete webview and I need to save the state of the app and so I used android:alwaysRetainTaskState="true" android:launchMode="singleTask">
Is this the right way of handling things? Any help would be highly appreciated.