Android, create "non visible" .apk -


i working on android framework composed main .apk executes in foreground , set of "plug-ins" .apk can downloaded , installed device silently. main purpose of architecture have 1 application running , being visible user , set of plugins executed main application cannot executed directly.

so far found 1 way discover available packages installed on device following code:

packagemanager = getpackagemanager(); applications = new arraylist<>(); intent intent = new intent(intent.action_main, null); intent.addcategory(intent.category_launcher); list<resolveinfo> availableactivities = packagemanager.queryintentactivities(intent,0); 

but code retrieves packages have category_launcher exposed. question following:

  • can create apk when installed not visible user? not give possibility launched stand-alone?
  • if create custom intent, how can make main application aware of new package grouped new intent, has been installed in system? sort of trigger, possible?

that can downloaded , installed device silently

that not possible, except perhaps on rooted device or via special system app. otherwise, user involved in installation of plugins.

can create apk when installed not visible user? not give possibility launched stand-alone?

you can have app not have activity launcher <intent-filter>, if mean. user still see plugin in list of installed applications , other places in settings.

you need use explicit intent (one has component set) when working plugin, move out of stopped state. until talk component of app using explicit intent, nothing in plugin run (e.g., manifest-registered receivers).

if create custom intent, how can make main application aware of new package grouped new intent, has been installed in system?

that not valid english sentence. going interpret meaning:

how can find out when user installs plugin?

you can watch action_package_added broadcasts find out when new apps installed. @ point, can determine if newly-installed app plugin of yours, 1 means or another.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -