GeekyAnts / external_app_launcher

BSD 3-Clause "New" or "Revised" License
14 stars 31 forks source link

Application not launched when not in background #8

Open smildev opened 2 years ago

smildev commented 2 years ago

Hi.

I have a problem for launching an app when not int background.

We use awsomeNotification to customize some notification. When a notification is received, we also simulate a phone call. Then, when user accept the phone call we launch the app.

When the application is in background, its works, but when the application is not launched, its not working :(.

Have you got any solution .

Thanks for your feedback.

Gayathri-GA commented 2 years ago

Hi @smildev , Thanks for posting the issue.

Need some details on the same. Can you please try out and post screenshot ,by creating a bool variable which will keep tracking of all your background or foreground process. So that we can able to identify the cause for app in its not working state.

smildev commented 2 years ago

Hi, Thanks for your answer.

I don't understand what you want me to do "by creating a bool variable which will keep tracking of all your background or foreground process".

Sorry, i'm just starting flutter/mobile dev.

Thanks.

Gayathri-GA commented 2 years ago

@smildev You can have a conditional(Bool) variable to check if the app is in its background or foreground state and then define your action which you want the app to perform in both distinct states.

smildev commented 2 years ago

So i tracked my application state. First of all, I execute app_launcher from a background service.

When my application is in background (state DETACHED) i'm able to launch my application. But when my application is not launched (state INACTIVE) i can't launch it, i try to launch another application without any result.

In both case, external_app_launcher is executed and its callback value is "app_opened".

(Xiaomi mi 9 - Android 10)

kustraslawomir commented 6 months ago

So i tracked my application state. First of all, I execute app_launcher from a background service.

When my application is in background (state DETACHED) i'm able to launch my application. But when my application is not launched (state INACTIVE) i can't launch it, i try to launch another application without any result.

In both case, external_app_launcher is executed and its callback value is "app_opened".

(Xiaomi mi 9 - Android 10)

Have you solved this?