Openning only one instance of AI app

Hello.
I use an app A to open an app B made in AI
my problem is A can open several time B.
today it open several instances of B (B play music, so i have twice or more musics played)
So I don't want to open new instance of B but the one which is already open.

How can i prevent B to open twice ?

I took a whack at this problem, but failed.

I thought TinyDB changes in one instance of the app might be visible in another instance of the app at startup time. Sample code:

one_at_a_time.aia (2.3 KB)

This experiment failed.

On second thought, perhaps changing the Namespace of TinyDB on the fly might flush TinyDB from RAM to the file system, where it will be available to a fresh copy of the app.

It's a good idea ABG !
may be using a file instead of TinyDB...

A file is probably the classical way to do it.

Here is another attempt that failed ...

one_at_a_time_V2.aia (2.6 KB)

I must admit I rarely interact with the Android O/S as a user, preferring to spend my time with program and data structures.

:smile: :smile:
I see you have as far as failed tries as I :wink: :+1:

yo might want to modify the manifest of B

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

How do you open app B from A, with Activy Starter?

In this case app B can tell app A that it is already open and working.

I open app B from a service

I can modify manifest of an AI app ?

well, I don't know if you can, but if you want to know how to modify the manifest, then a search in the community might help...
for example

Taifun