Android应用 - 的方式来开发应用程序,具有附加 [英] Android App - Way to develop app that has add-ons

查看:108
本文介绍了Android应用 - 的方式来开发应用程序,具有附加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有,你会如何发展一个应用程序,有一个大纲或引附加?让我解释。基本上,如何制定某种框架添加主题来的应用程序。

目前有2个主题的基本应用程序。我想有另一种应用程序,你可以在市场上下载特定的主题。

如何在原有的应用程序和新的下载程序议论起来?你会如何​​发展原有的应用程序,以获得第二个主题,唯一的应用程序的主题信息和图片资源?我的理解是,应用程序是完全独立的,所以这是为什么我不清楚如何做到这一点。

任何帮助理解过程的纲要,以及也许一个小例子是大大AP preciated。

感谢

解决方案
  

如何在原有的应用程序和新的下载程序一起聊聊?

有关一个主题,谁说,他们要一起聊聊?

  

如何将您开发的原有应用程序,以获得第二个主题的主题信息和图形资源唯一的应用程序?

步骤#1:选择你的包的命名约定。例如,如果你的基础的应用程序是 com.abc.app <​​/ code>,你的主题可能是 com.abc.app.theme。*

步骤#2:当谈到时间为用户选择一个主题,使用 PackageManager getInstalledApplications()通过检查自己的包名找到你的主题。

第三步:当谈到时间使用一个主题,叫 getResourcesForApplication() PackageManager 来获得主题应用程序的资源,这样你就可以在你的东西得到的。

我相信,有战略(例如,主题大多是传送带,部署了的东西,在对外部存储的目录,从中你的主要的应用程序读取信息),但是这是一个我会从的,因为它应该需要最少的用户干预。

Is there an outline or primer of how you would develop an app that has "add-ons"? Let me explain. Basically, how to develop some sort of framework for adding "themes" to an app.

There is basic app with 2 themes. I want to have another app that you can download in the market for a certain theme.

How does the original app and the new downloaded app talk together? How would you develop the original app to get the theme information and graphic assets from the 2nd theme only app? My understanding is that apps are completely separate so this is why I am unclear how to accomplish this.

Any help in understanding the Outline of the process as well as maybe a small example would be greatly appreciated.

Thanks

解决方案

How does the original app and the new downloaded app talk together?

For a theme, who says they have to talk together?

How to would you develop the original app to get the theme information and graphic assets from the 2nd theme only app?

Step #1: Pick a naming convention for your packages. For example, if your base app is com.abc.app, your themes could be com.abc.app.theme.*.

Step #2: When it comes time for the user to pick a theme, use PackageManager and getInstalledApplications() to find your themes by checking their package names.

Step #3: When it comes time to use a theme, call getResourcesForApplication() on PackageManager to get the theme application's Resources, so you can get at your stuff.

I am sure that there are strategies (e.g., the theme is mostly a conveyor, deploying its stuff in a directory on external storage, from which your main app reads the information), but this is the one I'd start with, as it should require the least user intervention.

这篇关于Android应用 - 的方式来开发应用程序,具有附加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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