How to run external, downloaded yet not installed apps on Android?

前端 未结 5 792
失恋的感觉
失恋的感觉 2020-12-24 03:39

I am just curious :

Some apps , usually for developers, allow to download other sample apps and execute the sample apps without installing them.

An example

相关标签:
5条回答
  • 2020-12-24 04:01

    It seems DevAppsDirect uses a part of the Android Open Source Project called the "Launcher", my guess is that they took that part of the OS and tweaked it so they could include it inside their own App to launch compiled APKs from the libraries as a Demo.

    Launcher is in charge of the Home screen of the phone, launching other Apps, hosting widgets, etc.

    You can get a copy of the Android Open Source Project here: http://source.android.com/source/downloading.html and take a look at the com.android.launcher package.

    0 讨论(0)
  • 2020-12-24 04:04

    You should try using Manifest Viewer to check out the AndroidManifest.xml of DevAppsDirect. Sadly the app doesn't have an option to export the manifest. From a cursory glance, I don't think he's actually installing the apps shown in the list. You should probably have a look.

    0 讨论(0)
  • 2020-12-24 04:09

    Very Interesting! I think this is doable, thou haven't tried it myself.

    • If you have an apk in your server, you could download it from your app
    • Now you can use zip utility to unzip into your own applicaiton private memory
    • Parse the Manifest file to determine the main activity
    • Next you can use ClassLoader or DexClassLoader to dynamically loader the activity.

    I believe this is what goes on in DevAppsDirect

    0 讨论(0)
  • 2020-12-24 04:14

    i've talked with the developer of the devAppsDirect (website here) , and here's what he wrote:

    The technology behind DevAppsDirect is called inAppSquared (www.inAppSquared.com) . In a nutshell inAppSquared allows you to turn an Android app into a plugin. This is done using only the publicly available Android API, no crazy hacking involved.

    I did this by creating a new new mobile platform the same way Xamarin and Titanium are mobile platforms. The difference is inAppSquared has the same API as the Android API and once an app is ported to inAppSquared it can be run without being installed.

    There are lots of possibilities for this technology. You mentioned plugins and extensions, but it could also be used for App Discovery, advertising, subscription services, A/B testing, bug fixing and much more.

    0 讨论(0)
  • 2020-12-24 04:19

    You can use Android's class loaders (in this particular case probably the PathClassLoader) to dynamically load classes at runtime without installing them.

    Take a look at e.g. https://github.com/Rookery/AndroidDynamicLoader to see how this can be implemented.

    Plugin apk's might not even need something that complicated but can just communicate via Intents sent to exported activities and posted back results. You can use PackageManager (http://developer.android.com/reference/android/content/pm/PackageManager.html) to query for which intents activities are registered.

    0 讨论(0)
提交回复
热议问题