Converting An Existing Application To A Library
Converting an existing Android application to a library is incredibly simple: All I have to do is check the is Library checkbox in the project's properties. However, once this easy
Solution 1:
You will mostly have to derive new classes from the ones included in the librairy or call their methods. If your librairy has classes such as activities, applications, you can extends them has you said.
Another solution could be to isolate the code you want to reuse and plugit into other activities by dependency injection. But this framework seems an overkill to me where you can just derive new classes.
A more android specific problem could be : how to call my new activities from within my new applications. The answer here relies in intent and to use different action names to call for the extended activities.
Regards, Stéphane
Post a Comment for "Converting An Existing Application To A Library"