Closing duplicate apps

I have an app that receives video sharing.

When the app is closed and sharing takes place, the app opens to receive the new video.

But when the app is already open, it is opened a second time, which is not desired.

Imagine receiving, for example, 5 videos, and having 5 copies of the app open…

I tried some solutions using the commands to close the app, but it didn’t work (or maybe I didn’t know how to do it…)

How to avoid this problem?

Thanks in advance

Nobody knows how to solve this problem?

you explain your issue with screenshots or screen record as i can’t understand what error your’re experiencing

1 Like

LET’S DO IT STEP BY STEP

For start, we don’t have any apps open :point_down:

Let’s open instagram to share a video from there :point_down:

I select my app… :point_down:

At that moment, my app opens and shows the shared video. Until then, this is what should happen. :point_down:

Now we have instagram and my app open, as it should be :point_down:

Let’s repeat the process with another instagram video :point_down:

And the new video was correctly shared :point_down:

THE PROBLEM OCCURS HERE

When we shared the second video, the app opened again, staying open twice. :point_down:

If I share more videos, the app opens again and again and again for each shared video.

I want only the most recent copy of the app to be open.

That is, I need to close the previously opened copy before sharing the new video

Using the “Close application” block doesn’t work, because of course it closes the current (newest) copy.

How to solve this problem?

Wow, it is crazy. I didn’t even know something like this was possible. Can you share your apk so I test it here to see if the same problem happens?

make use of this free extension.

“call remove” on “App pause” or “App Stop” event or similarly you can do it on your own.

Then if second time if the video is shared, then it will be automatically visible in Recent apps.

So this solved duplicate apps on Recent Apps.

Extension link:

Yes, this happens every time. I’ve tested it on several smartphones.

Where are you from?

Brazil?

Thank you very much. I will test this solution, and post the result here.

1 Like

As promised, here is the result of the proposed solution.

Result: IT WORKED PERFECTLY.

I just needed to put the “Remove” block in Screen1.Initialize, as shown in the image below.

Many thanks to those involved in the solution.

Strong hug.

Screenshot 2023-07-20 at 12-45-15 Kodular Creator

1 Like