Android附加库项目?

Pet*_*rdk 3 android add-on

我在Android上有一个迷你钢琴应用程序,我想扩展可下载的附加组件.例如,我将grandpiano的声音设置为单独的可安装包.

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

有什么指针吗?

例子

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

另外,我知道Ruboto使用的ruboto-core软件包包含JRuby的东西,它安装一次,所有Ruboto软件包都依赖于那个,所以它必须是可能的

Pet*_*rdk 5

我发现可以访问其他APK的资源.我不知道它是否仅限于具有相同签名的应用程序,这不是我尝试过的.我知道你可以访问其他apk的代码,因为这是wat ruboto正在使用它的ruboto-core包.

要从其他已安装的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);
Run Code Online (Sandbox Code Playgroud)

这也适用于原始资源!