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

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

问题描述

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

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

首先,我们有 2 个 Android 应用.A 显示 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 应用并安装它(就像你在任何市场下载它一样),然后使用 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.

我不知道是否有可能:

  1. 下载应用并以编程方式安装
  2. 像这样创建一个变形"Android 应用.

如果我必须用一句话总结我想要的东西,那就是:
使用 B 刚刚下载并安装的 A 应用修改 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)并使用 Fragments 或任何代码注入或东西.

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天全站免登陆