So I've been looking everywhere to try to allow my app to have a new instance of an activity whenever I want "onCreate" but I haven't found much to help me. I understand that you can use launchMode="singleTop"
so you can force everything to be a newIntent rather than onCreate. I tried using taskAffinity but it only allows all of the activities of your app to show in recent, whereas I'm trying to allow 1 activity to be opened multiple times. I believe chrome did this at one point. Everything helps, comment if you didn't understand.
Asked
Active
Viewed 416 times
0

Phantômaxx
- 37,901
- 21
- 84
- 115

DrBrad
- 163
- 2
- 12
-
I beg your pardon if I misanderstand you. I think this is a risky/obstrusive/undesired behaviour for an app, like the old fever of browser popups, which are now all blocked by default on nowadays browsers. So I think what you ask is not allowed. – statosdotcom Feb 06 '18 at 15:54
-
The reason I want to do this is for a video player. Because when a user wants to open another video it always replaces the instance/intent with the new request. I wasn't 100% sure if it was disallowed in newer versions of android. – DrBrad Feb 06 '18 at 16:04
-
However is there a way to do this at this point? – DrBrad Feb 06 '18 at 16:25
-
Let's wait for the community. While this is going, why not to rethink or redesign your UX? Maybe tracing your user (with sharedprefs for example) then when s/he returns from a video, you already knows what was going (which video and playtime position) and then resumes playing? – statosdotcom Feb 06 '18 at 17:32
-
Good idea, however how would they be able to flip to the other video. The only other thought I have is making multiple activitys, like a, b, c, and d. then open those and after it hits d it the user must close one of those out to open another. – DrBrad Feb 06 '18 at 19:33