when i try to update version in my android app to own site. The problem will be occured during the installation. that's
App not installed
An Existing package by the same name with a conflicting is already
installed.
Can any one help how to download updated app without uninstall.
Thanks in advance.
you have to change both
android:versionCode="4"
android:versionName="1.0.4"
android:versionCode is a integer, eveny update increment by 1
android:versionName can any string
and you use same Keystore
If your installing from your own site, don't increment the version code and name of new apk your uploading, use the same code and name of already existing apk, it will replace the existing one so no need to uninstall the app.
Try by enabling the "install app from unknown source" in device settings
Best way to do Even if your using the app for internal purpose you can sign the app using live keystore(not debug keystore) and upload it in your own site.
Another way to avoid getting your scenario:
If you want only some particular users to download the app that is the reason if you have hosted your app in your own site means, google provides an option to do this for testers where you can add their email in alpha testing or beta testing so that whenever you upload an apk to playstore those users who you have added will be notified and can update the app without uninstalling the existing(this wont be visible to all users who you have not added).
Related
I've reinstalled windows and accidentally removed the key-store file that I've used for my project. I try to make a new one, but something is not inserted like the last time(alias maybe.) Now I have a problem: When I start to update the.apk file I get the following message:
An existing package by the same name with a conflicting signature is already installed.
My application automatically checks for project updates (new version) on a private server. The problem is that some people already have an app on their phone.
My idea was to compare keys and if it's different to ask the user to remove old apps in some dialog or something like that.
Is something like this possible, if not what are my others options ?
Thanks.
You need to release a new app with a new packagename.
If you no longer have the keystore used to sign your first app, you can never update it again in Play Store.
If you distributed your app manually and have not released it via Play Store, your users can uninstall the app signed with the lost key and install the new one.
There is no way to show a dialog as you cannot update the app. You can only replace it as described above.
I am building a launcher application that I would like to update over the air. I created a service class that successfully checks and compares App version numbers to determine whether an update is needed. If the compared apk version is higher than current version, I download the apk from my cloud server, and then bring up a dialog to install it.
The conflict I am facing is that the update will not install. I receive an error "An existing package by the same name with a conflicting signature is already installed". I am beginning to wonder if my methodology is correct. How can I resolve this? Here is what I am doing.
Once an update is confirmed, I display a dialog and on press of the confirmation button I use an Intent to parse the app URL
Intent i = new Intent(Intent.ACTION_VIEW);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
i.setData(Uri.parse(appUrl));
startActivity(i);
finish();
This actually posts a notification that I have to click and press install on. Once I do, it attempts to install, but then gives me the error on conflicting signatures.
Ideally, I just want it to install without having to see the notification. Thank you in advance.
You need not necessarily use Playstore or any other app hosting service to manage your application upgrades. Your users should enable: Install from un-identified sources (on their android handset)
For auto-upgrade you must release all your APK's with the same Signature. If you just build and run the application from Eclipse, the APK file generated in DIST folder is signed with Debug key (the default key of each machine)
Now if you build the same Code from different machine, the debug key values will be different and you would get the error: "An existing package by the same name with a conflicting signature is already installed" while installing the new APK
Here are a few solutions to it:
Always release the APK for auto-upgrade from same machine (this is definitely impossible)
Sign all the APK's with same signature. In Eclipse: Right click on project > Android Tools > Export Signed Application Package
You are setting it up almost correctly, but you should also set the data type:
i.setType("application/vnd.android.package-archive")
Additionally, do not call finish() after startActivity(). It is not necessary and might cause issues with the new Intent.
Your signature conflict is another problem. See this answer. The APK you are trying to install is signed with a different key that the currently installed one.
Finally, there is no way to install an APK without the user's explicit interaction (unless you have root, of course). This is intention for security reasons.
I have seen the "same signature" error when deploying directly from Android Debug Bridge. I am thinking you will not be successful in this approach, because:
Android security always requires user authorization to install updates (unless you are rooted, or are part of the system like Google Play Store auto-update.
Google play always has to kill the running process to update it. This probably will be ok if you service and the application are actually separate installations (i.e. two apks).
The same signature error I received in ADB is usually when the system is requiring me to completely uninstall the original signature application. Two applications with the same signature cannot be installed concurrently; something is triggering Android to not perform an 'upgrade' of the same package.
Here are the allowable ways to perform an upgrade:
Is there a way to automatically update application on Android?
I have developed and published an app(version 1) on Developer console. Unfortunately my OS crashed, so I've lost my Key-store. Now I want to release an updated app (version 2). When trying to update it says "Certificate not matched". So how to update my app (version 2) in the place of app (version 1). I also want to give updates of this app(version 2) to users who are already using my app (version 1). Any suggestions are welcome...! Thanks in Advance..!
The only way to update an app is by building it using the same package name and keystore. It's called a keystore for a reason - it's your key to the app and nobody else can get at it. If you've lost it, there's nothing that can be done - even Google wouldn't be able to restore it for you. If you publish on Google Play, it's essential to keep a backup of your keystore to avoid this issue.
If you lost your keystore then you will not be able to release any update to existing app. There's no way to do that. So if you got no backup of your keystore then you are doomed.
Bad news for you - you won't be able to update your app - that's the whole idea with Key-stores.
See the docs here:
Application upgrade – As you release updates to your application, you must continue to sign the updates with the same certificate or set of certificates, if you want users to be able to upgrade seamlessly to the new version. When the system is installing an update to an application, it compares the certificate(s) in the new version with those in the existing version. If the certificates match exactly, including both the certificate data and order, then the system allows the update. If you sign the new version without using matching certificates, you must also assign a different package name to the application — in this case, the user installs the new version as a completely new application.
In other words - your app won't be treated as an update, rather as a new app.
I had submitted an application to Google play store that is running on the real server.
On the other hand, I am still improving the application with a fake server. The reason of having 2 server is because all data in the fake server will not affect the real server.
Whenever I want to do demonstration with the real server, I have to uninstall the test app and download the real app on Google play stall. After the demonstration, I have to uninstall the real app and then install my test app on the android phone. It is kind of troublesome after doing this more than 2 times a day.
Is there any way I can install both the test and the real app on the same phone?
I tried to rename my package name. But I found the refactor function in eclipse not a clean renaming. I have to manually rename some of the file and this take up a lot of time.
Just wondering if there is any other better way to do it. It would be good if there are some suggestion that I can try.
Replace your debug key with your production key and set the appropriate passwords to allow the signing. This way Android will let you update/overwrite the old version.
In Eclipse, select Window --> Preferences--> Android --> Build
You can have your keystore pointed here
However, your key store must use the same profile name and password as the default key store.
I have android app, that version is 1.0. There are some updates so changed the version number to 1.1. I did not upload into android market.
It's a private application.
Normally update app happens like this: If there is version number which differs from installed app, then I should update. That time It don't delete my database contents
is it?
How we can update into version without publishing into android market?
because my applications sales person going use.when there are in the fields(on way to go shop or anywhere their-self want to update)
If there are new version is available then In sql server database also we mention the flag "1" (bacause of sales person can identify there are update version is available)then It should download apk & need to update the system automatically?
OR
when we launch the app,It should check the version number or update available, then should update automatically..
How we can do it?
OR give me a idea of update the android apps..
How we can do this?
Please help me..
Thanks in advance
You'll need a versioning system on your server.
Check the current version by calling your servers and checking if there's an update.
If there is an update, download the new APK from your servers through the app by calling the browser on the APK's URL.
This will start a download automatically.
A few problems:
1) Some devices rename the APK to txt for some unexplained reason, I think it has something to do with mime-types
2) The installation won't happen automatically. The user will have to click on the finished downlaod to start the installation.
3) You'll have to check the "Unknown Sources" in the Settings -> Applications menu to allow apps to be installed from outside sources (not the Android Market)