Launch Existing Singletask Activity From Launcher Icon
Scenario: Activity A (MAIN and LAUNCHER in manifest) starts up when clicking on launcher icon. In turn it launches Activity B. Activity B then launches our main app Activity C (MA
Solution 1:
See similar scenario here.
In your case, I would recommend using a similar approach, where you would have a SharedPreference that would persist a value representing whether your app had previously been launched.
Create a simple Activity that will contain the logic for what you are trying to do here. In that activity's ("pre-A" Activity) onResume() method, check the value of the preference representing whether the app has ran previously.
If it has not previously been ran, launch an intent to Activity A, which calls the subsequent B and C activities; otherwise, launch an intent to Activity C.
Seems pretty straightforward, just remember to define the new "Pre-A" activity in your manifest!
Post a Comment for "Launch Existing Singletask Activity From Launcher Icon"