Is there any method to clear Flutter app from background process too

Viewed 464

I have a flutter app, i want functionalty in that when app open it will automatically open a url in browser..when browser will open, app have to be closed automatically and clear from background too...clear from background is important to achieve

3 Answers

Actually there is no way to do this, Android & iOS by design prevent apps from doing this. Also most probably Apple will reject an app that only opens a link.

Alternative to doing this is making an app widget that do this exact process and the app will be like a setting page for this widget, it will not appear on background apps when the widget opens the url in the browser, and apple will accept this app.

Note: exite(0); will not clear the app from background (I.ve just tried it) and Apple will consider it a crash, so they will reject the app.

Exit method can help:

                exit(0);

tried calling this method, i hope this would be solve your problem.

I tried every method, but I think it's not possible to remove app from background (recent apps). We have to remove it manually.

Related