开发者

Android: How to reuse the existing application to create a new application

开发者 https://www.devze.com 2023-03-12 11:13 出处:网络
I have created a new application. Now I wanted to create a new application with the same look and functionality except the certain text and the target url that communicate with the server.

I have created a new application. Now I wanted to create a new application with the same look and functionality except the certain text and the target url that communicate with the server.

How can i reuse the whole application without too much changes? I tried to generate the jar files from the existing application proje开发者_JAVA百科ct and put it into my new application project. In the manifest file , how can I tell the new application to run the activity which stored inside the generated jar file from the reused application?


I would suggest making most of your application into a library project. Then the original application and the new one would be new projects that depend on the library and would define their own app-specific resources. The manifest file for each project would list the activities needed for that project just as if the activities were defined in the project sources instead of in the library. See Managing Projects for more info.


No need to create jars, I suppose. In your case if you want minor changes then why don't you just copy the whole project to some directory, rename that and add to your workspace and make changes.

Otherwise, Make a library of all most of the common part and use that.

0

精彩评论

暂无评论...
验证码 换一张
取 消