Where can I define that I want users to be able to run only one instance of my app?
On android it seems to be possible to define this with the android:launchMode tag
for other platforms I don’t know.
Is there a tag I can put in my project.xml (or somewhere else) to say that I want users to be able to run only one instance of my app at a time (when supported by the platform)?
I thought that mobile apps generally ran as only one instance?
On the desktop, you could write a file, and delete on exit, and use that to enforce a single instance, but you could have trouble if a user’s system crashes before you exit. To avoid that, you could overwrite the file periodically with a timestamp, so you can check to see if the file has been recently updated
Thought so too. But I have a user that tested one of my apps and told me that he run two instances of my app at once (and finished a level in one instance but closed it first, resulting in the level not beeing seen as succeed when he closed both instances and restart the app…)
Maybe that changed on latest android versions (I don’t have an android device with android >=6.0 yet and apps crash on emulator so I can’t test for now…)
I will ask him for more informations (his device model and android version and if he can reproduce running too instances at the same time)
Yeah, this is the first I’ve heard of it
OK. well he just told me he couldn’t reproduce running too instances at once on his android phone.
So this is just something weird that happen on his phone…