Creating Modular Android Applications on Eclipse

I am currently moving the framework for building J2ME applications on Android. This structure consists of several projects that are compiled into libraries (banks). Each JAR can contain graphic data (resources, J4ME screens, etc.). Each project usually has a clearly defined entry point (module). When someone wants to create an application using the framework, he only needs to create a Midlet project and add the library dependencies and use the imported classes.

We used the same approach to develop the Android platform. In this case, we used only regular Java projects inside Eclipse, which are compiled into jar libraries. These projects are dependent on the Android Framework (android.jar). When creating a new application, we create an Android project inside Eclipse and add dependencies.

Our next step is to create more advanced modules for Android, which can also contain graphical information ("Actions", "Dialogs", "Literals", "Boards, etc.). So far, only the Android Eclipse project (the final application) was needed, in which there were all the classes and resources related to graphics. It seems that when using resources (literals, drawings, etc.), the only approach is to create an Android application, since the resources are available only using an integer handler automatically created by the ADT plugin (R.XXX). Thus, the creation of graphical modules may not be built using simple jar Java projects.

The information of the Android developer explains that modular applications are possible, but I did not find a brief guide explaining this process, but some tips, for example, how to prevent an error during use, cause the intention made by another application . This is true when creating applications that use resources from other applications. I do not need several installed applications on the system, but one of several components.

Does anyone have experience with similar requirements? Any good tutorial or tips to get you started?

+4
source share
1 answer

It seems that the only available way is being described here , as this other question outlined by the accepted answer .

The solution, however, is quite new (it only works with the latest versions of the Android SDK, it took R6 and SDK 2.0.X were left without support). This has some basic warnings that I hope that Google already works:

  • Missing binary library binding . This means that the main application needs access to the sources (in Eclipse, it is assumed that all related library projects are open).
  • Resource names (layouts, drawings, etc.) are processed globally . This means that if you have two "main.xml" layouts, only the most relevant (the top ones in the list of libraries) will be used.
  • Missing functionality / ERRORS . The documentation states that exported library project actions should only be declared in the AndroidManifest.xml library project. This does not work in the current version. The comments inside TicTacToe indicate that this is the desired job, but for the current version of the Android applications used in the library projects, they should be explicitly defined in the AndroidManifest.xml of the main application project.
+1
source

All Articles