I have made two application, both having two different classes and xml files and all. however, after i have installed the first application (lets call it A) and after that, i want to install the second application (B), there is a pop up message stating "android do you want to install an update to this existing application? your existing data will not be lost. it does not require any special access."
when i press ok, A will be gone from my phone and will be replaced with B. why does this occur? can anyone help me so i can install both my apps without either one disappearing ?
The manifests of both applications have the same package name in it. That's why you get the replace notification. Change the packagename of the 2 apps.
Right click on your project, go to Android Tools, and then click on Rename Application Package.
If it is not working then follow these steps
1. Right-click on your project package name
2. Refactor > Rename.
3. change the package name in the manifest file. Inside the <manifest> tag.
4. Open each of tyour Activity files and add missing import packages (Ctrl-Shift-O)
Related
I want ti install same app twice without replacing the each Other.
something like :I Want play a game from the start without losing previous game saved data.so, Is there a way i can install same apk twice without replacing the previous one. is it possible??
Will changing the apk package name & changing default installed Directory of app work?,but i think it doesn't work.
Actually you can I do that before BY:
You must have a different package name (make sure the package name in the AndroidManifest.xml file is different), there is no other way. I had two different versions of the same product (free & paid) and used: com.package.paid & com.package.free.
This means that nothing is shared between the two apps (DB included).
You can also use ANT scripts to build both apps from the same code base, I just changed it manually every time I needed to build a version. Hope this help :)
You can't do that, android only allow one version of an app exists. Do an upgrade or downgrade installation, or find another device to install the same app.
I am starting doing my first steps in the Android Apps development and I hope to get some guidance from some experts.
I have installed Eclipse successfully and created an App that is merely streaming one shoutcast radio station.
The big issues started in the moment I wanted to create the second Radio App to play a second different radio station.
The second App is somehow identical to the first, with only change being that it points to a different shoutcast http link...and it has also some different icons/logo.
I had many problems understanding how to duplicate the Radio App with Eclipse and be allowed to save it. Anyway now I believe this is solved but the copy and paste job is probably what has originated a second problem.
== The issue: Now, after having completed the Second "Radio App", my Sony smartphone asks me if I want to UPDATE the First Radio App I successfully installed, rather than letting me install the second.
So, obviously even if I changed the name of the App in many lines, there must be something that makes my phone see the second App as a duplicate and a potential update to the first radio app.
In fact it is a second and different App and I need to install both of them and even a third App for a third radio station!
What am I doing wrong?
In your app manifest tag, there is a package attribute. This value is your app's unique identifier. If it is the same, it is treated as the same app.
See: manifest
In Eclipse (latest current version), right click on the project from "Package Explorer" (left side of the panel), from the opening menu' select "Android Tools" and select "Rename Application Package". You will be asked for the new package name. You can't change the "structure" of it.
Eclipse will warn/inform you about the change that is going to apply.
Eclipse will change the name of the package everywhere is needed, accordingly. Doing the same manually, most likely you will face ugly results and spend more time.
I've created an android app and installed it on my device.
Now I have changed the name and the icon for this app.
Is it possible to install this next to the "previous" app ?
When I try this it overwrites the previous one.
(I would prefer not to change the package name(s) since want to do this more then once).
No it is not possible the way you want. Name of application is irrelevant (it is just for humans). Package name (package attribute of <manifest> is what matters, so you need to name packages of your both builds differently to make this happen. There's no other way.
You will have to change the package name.
I developed an app for android, but I need to install two instances of it, one for my daily use, another for debug/development, I don't have too many phones for debug, just have one phone, and don't want to debug on emulator, because it's too slow compare to real phone.
Or is there any thing we can change on APK file, then we can install it as another app, e.g. change it's package name ?
Currently, I changed the package name in code then make them to two apps, which can be installed on the same phone, but this way is not convenient. seek for simple way.
Update: is there any tool to modify package name in androidmanifest.xml directly after packaged(apk file)? then we just need unzip the apk, modify the androidmanifest.xml, zip the apk again.
You've answered the question yourself. You have to change the package name in the manifest, otherwise Android will override the old app (or can't install it, if the certificate differs).
Try changing the the name of the app in strings.xml from resource folder #string/app_name to have multiple instances of the same app. And package name must be changed so that the existing app is not overridden.
You can copy your project and change the package name in the copy.
You can use the same SVN path to apply the changes on the two projects.
Or you could automate the different builds using an ANT build.xml file with parameters. There are several examples on how to do this for Android in Google.
ref: One android application, one startup view, two icons
I would make the original app a library project and create a new project which uses the library project.
Advantage:
you can have both running as your new project should have a different package name
easily identification by overriding the app name in your new project (just add "beta" to it)
both versions can be installed on one device/emulator parallel
pretty good setup if you try to verify the update process of your app
no confusion with a version control system - renaming packages results in awful non-real changes on your development branches
Disadvantage:
you need to "uncheck" the library setting before you can release the original project
you might need to change some stuff in both manifest files which will increase the maintainability in a small manner
If you really need a market version of your app on your device, this method is the easiest one as a package rename will very probably result in worse maintainability.
edit:
You can mark a project as a library project in project preferences -> Android. After that you can link add that library project to another normal android project at the same spot, just click on the add button.
I downloaded the source code of OI Notepad and did some modifications to it. And then made an .apk file out of it. But when I try to install the .apk it shows
This is a system application.
Do you still want to replace it?
When i say yes it moves forward but does not install it..
I have this post My application tries replace another my application and the answer given there the package name of both the apps cannot be same.
But is there any way in which I can manage to install modified OI Notepad without any hassles of replacing the older one. It happens in Emulator..
Thanks
If you are using eclipse you can right click the package tree and use the refactor option to quickly change the package. This, in most cases, correctly updates the Application Manifest for you. This 'should' resolve the error you are having keeping in mind that you will now have two versions of the application so it may be in your best interest to change the application name of your custom version so you can easily distinguish between the two.