Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/203.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android附加库项目?_Android_Add On - Fatal编程技术网

Android附加库项目?

Android附加库项目?,android,add-on,Android,Add On,我在android上有一个迷你钢琴应用程序,我想通过可下载的附加组件来扩展它。 例如,我会把一架大钢琴的音响作为一个单独的可安装包 我看到一些有附加组件的应用程序(比如NIV圣经,它添加了不同的圣经版本)。 我想知道如何将一个单独的apk插件集成到我的主程序中。我如何访问这些?我需要做什么来集成这些附加组件?等等 有什么建议吗 示例 NIV圣经在市场上有几个附加组件,您可以使用市场下载。看起来它们确实使用了包中包含的数据 另外,我知道Ruboto使用一个Ruboto核心包,其中包含JRuby的东

我在android上有一个迷你钢琴应用程序,我想通过可下载的附加组件来扩展它。 例如,我会把一架大钢琴的音响作为一个单独的可安装包

我看到一些有附加组件的应用程序(比如NIV圣经,它添加了不同的圣经版本)。 我想知道如何将一个单独的apk插件集成到我的主程序中。我如何访问这些?我需要做什么来集成这些附加组件?等等

有什么建议吗

示例

NIV圣经在市场上有几个附加组件,您可以使用市场下载。看起来它们确实使用了包中包含的数据


另外,我知道Ruboto使用一个Ruboto核心包,其中包含JRuby的东西,安装一次,所有Ruboto包都依赖于这个包,所以它一定是可能的,我发现可以访问其他APK的资源。我不知道它是否仅限于具有相同签名的应用程序,这不是我尝试过的。我知道您可以访问其他apk的代码,因为这是wat ruboto使用其ruboto核心包所做的

要从另一个已安装的APK访问资源,请执行以下操作:

//Get the other apk's resources
Resources resources = context.getPackageManager().getResourcesForApplication(
            "package.name.goes.here");

//Then you need to get the ResID
 int resID = resources.getIdentifier(
            "name_goes_here", "string(or other type like raw)", packageName);

//Open stringResource
 String resourceString = resources.getString(resID);
这也适用于原始资源