android - how to load an application into RAM, without launching that app -


i want load group of applications ram, without launching them. when loading applications ram, user should unaware of them.

i tried following code:

intent launchintent = mcontext.getpackagemanager().getlaunchintentforpackage(appname);     launchintent.setflags(intent.flag_activity_new_task);     launchintent.setflags(intent.flag_activity_multiple_task);     mcontext.startactivity(launchintent); 

above code starting application , brought application front. don't want application brought front.

you can via service. please read on android documentation.

service/activity/broadcastreceivers launched intents. activity shown in foreground. service run in background until stopped android os or developer. broadcastreceiver run max 10 seconds , stopped.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -