Open application from foreground service when application is closed
php editor Apple here introduces a very practical application operation method, that is, when the application is closed, the application can be reopened through the foreground service. This method allows the application to keep running in the background so that users can use it at any time. With simple steps, you can easily implement this function. Let’s take a look at the specific operation method!
Question content
So I use this code to open another app using my code (android studio, java):
1 2 3 4 5 6 7 |
|
and i have foreground service, when my app is running in background and my app is closed, nothing happens, even if my app is closed, how can i make it work
The only thing I've found related to this is that it's not possible when I know it's coming from another app, I have an app that opens on its own and the app is always running in the foreground
Solution
To achieve this, we need to add the system_alert_window permission to androidmanifest.xml
As shown below:
1 |
|
and accept popups above other apps in android app settings
The above is the detailed content of Open application from foreground service when application is closed. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

