主应用程序下载另一个应用程序然后使用 [英] Main app download another app then use it

查看:160
本文介绍了主应用程序下载另一个应用程序然后使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做的是可能很难解释或理解,所以我做了一个快速绘图。

What I want to do is maybe hard to explain or to understand so I made a quick drawing.

首先,我们有2个Android应用程序。显示屏Hello World和B有一个按钮(可能)可以下载一个应用程序(网络或本地)。

First of all, we have 2 Android apps. A display "Hello World" and B has a button which (maybe) can download an app (on web or local).

当我们点击B按钮,下载一个应用程序,然后安装它(就像你下载任何市场一样),然后使用A应用来修改B应用程序。

When we click on B button, that download A app, and install it (like if you download it with any market) and then, use A app to modify B app.

I不知道是否有可能:

I don't know if it's even possible :


  1. 下载应用程序并以编程方式安装

  2. 创建一个这样的多态Android应用程序。

如果我必须总结一下我想要的一个句子,那就是: >
使用刚刚下载和安装的B的应用修改B应用程序。

If I have to sum up what I want with one sentence it would be :
Modify B application with A app which B just downloaded and installed.

推荐答案

我确定你可以下载这些SDK(显然是这里的APK),并使用 Fragment 或任何代码注入或某些东西。

I'm then sure you can download those SDK (apparently as APK here) and use Fragments or any code to inject or something.

可能需要使用反射,因为主应用程序B不会解析A中的类。

Probably will need to use reflection though, because you main application "B" won't resolve the classes that are in "A".

也许您的A模块应该公开其具有的方法/变量/片段,如嵌入式JSON描述性资产或某物,B可以解析并知道该怎么做。

Maybe your "A" modules should expose the methods / variables / fragments it has, like in an embedded JSON descriptive asset or something, that "B" could parse and know what to do with.

这里的意思显然是将所有A代码从B移开,这意味着B的灵活性。

The point here is obviously to move all the "A" code away from "B", meaning flexibility for "B".

这篇关于主应用程序下载另一个应用程序然后使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆