android - How to launch an app, without bringing it to the foreground? -


on android, wrote service, launches app with

intent intent = context.getpackagemanager().getlaunchintentforpackage(pkg); context.startactivity(intent); 

this bring "pkg" foreground.

question: how launch pkg background? won't disturb using of current foreground app.

you're looking service. service in android used run operations in background , longtime.

a service application component representing either application's desire perform longer-running operation while not interacting user or supply functionality other applications use.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

php - Dynamic url re-writing using htaccess -

java - Multi-Label Document Classification -