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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -