intel xdk app install replaces the previous apk - android

Hi I'm experimenting with xdk and created few apk for from different projects, but whenever I install the apk on my mobile, it will install as an update and replaces the app though the app and project is different. How do I install the apk as a new app? Thanks.

change the App ID for your projects, if your projects have same default App ID then it will replace the previous install
Click Projects -> Build Settings and change the App ID
The App ID usually has this format: com.companyName.appName

I have the same problem, changing the ID did the trick for building android apps, but did not solve the problem in App preview (second app replaces the first).
I got this answer on the HTML5 Dev forum from a Technical Consulting Engineer
Intel Corporation, HTML5 Dev Tools:
The XDK gets its information regarding the name of the app, etc. from the .xdk file inside the project directory. If you did not change that, it might be the source of the problem. There is also a unique GUID inside that file which is probably the same for both of your projects. I believe if you set that GUID to all zeroes (replace each number in it with a zero) the XDK will reassign a new one to the project.
Just guessing, not 100% clear on what happened, but give that a try.
Worst case you may have to remove both projects, delete the .xdk files from each, and "import" them into the XDK.
EkG: !! Changing the GUID in the *.xdk file does work, but not if you set them both to zero's.
You have to make them different manually.

Related

Can the bundle-Identifiers of iOS and Android differ on Flutter?

I uploaded a test-release for an App on both iOS & Android on AppStore/GooglePlay using their respective native programs. In other words I reserved their bundle-identifiers string.
Now I'm trying to code the App using Flutter, which is freshly new to me.
Can I create a Flutter project (running on Android Studio) for this app and then change the bundle-identifiers names for each platform separately? and will it work so I could update these apps continuously?
For example,
One App created with a bundle-identifier for iOS like this: 'com.thisApp.thisApp', on itunessconnect (reserved).
Same App with a different bundle-identifier was created for Android on Google Play Console and reserved: 'com.anotherApp.anotherApp'.
None of the apps are LIVE.
Now, if I create a Flutter project I have to choose a package name say 'com.thisApp.thisApp'.
This package name will be created for both platforms by default!
Although I figured out that you could change the package name in Flutter,
as in this post - How to change package name in flutter?
However it's still isn't clear to me, if I DO change it, does the package-name must be identical foreach platform? i.e 'com.anotherApp.anotherApp' OR could the package-name/bundle-id for each platform differ? and even if it works on debug, will it work on release?
So I managed to solve this and answer my own problem.
Yes it is possible.
As already mentioned, before I started to work with Flutter, I used Android Studio and Xcode to upload a "draft version" of the App to the Google Play and App Store respectively in order to "reserve" these AppNamePackages.
Since in one store the same name/package was already taken, I used another name, for example:
com.thisApp.thisApp
and
com.anotherApp.anotherApp
To achieve this in Flutter you need to make sure that:
You change the desired applicationID in the Android-app level build.gradle file and in the AndroidManifest.xml
for this example lets call it com.thisApp.thisApp
You go through equivalent procedure for iOS by changing the desired package name in the info.plist.
for this example - com.anotherApp.anotherApp
By selecting any file under Runner folder (iOS folder in Flutter) you can click "Open iOS module in Xcode" and pick the correct App name and package in the App Project.
And that's it. Flutter didn't make problems considering the two different package names. The App bundles were uploaded based on their previous Google Play and iTunesconnet configurations.

Auto Updating Sideloaded Android App on Start

We have an Android app (.apk) published to a publicly accessible URL, any user who knows the URL can download and install the app.
The app is already installed on the relevant user phones and allowing sideload option from the settings is turned on.
How can I force the app, on start, to check for update and replace the existing app if found, then restart the app (to pick up the latest version)?
Is there a standard solution or a software package? Should I be thinking in a different way?
I am using Xamarin Forms, however, I am happy with Xamarin Android or any Java-based solution.
One thing you could do is to have a small plain text file in the same server where the APK is, that contains the version number of the APK available on the server. The runing app then just reads that text file and compares against its own version number.
If the version on the server is newer (has a higher version number), you simply download the new APK to a temp dir and install the APK programatically using the method outlined here: Android: install .apk programmatically
The way to go is HockeyApp. It´s a distribution system that does exactly what you are looking for. Besides, you get a useful crash logger and some statistics, etc. It´s free for 2 apps.
Once you install and configure their SDK in your Android app, an activity will popup telling the user a new update is available if there is any.
The user can install the new version with a button tap. Simple.
The setup process involves installing a nuget package and write a few lines of code in your main Activity class.

How to release and install two versions of the same android app using the same package on the same device

I have an android app with two different res folders (res-1, res-2) containing all layout specific and one shared package. Using ant, I can release and install on my device only one of the two versions of the app at a time. What I want is to release and install them both in the same time, in order to be able to see and test them both on my device.
Any suggestions how to achieve this ? Thanks in advance.
It's impossible to install two apps with the same package name, the existing one will be overwritten with the new installed. Rename the other package would be a solution. Maybe testing one in the AVD and the other one on the device?
Why not just include all the resources, and then at run time determine which is correct?

android development - smart way to have both the current published version and the development version on my device

I guess this could be a common problem for new android developer like myself so I thought to ask it even so it is not a big deal.
I would like to have both the current published stable version of an app and the under development version on my device. Yet when I want to install both I get
Re-installation failed due to different application signatures.
You must perform a full uninstall of the application.
I understand it technically yet I was wondering how I could have an easy way around this so I can have both application on my phone. I could change the package name for the time being but I hope there is an even more straight forward way to get it done.
Thanks
UPDATE
Solution as given by "Marc Bernstein" in the following post - thx Algo for posting the link to it
How to change package name of an Android Application
There is a way to change the package name easily in Eclipse. Right click on your project, scroll down to Android Tools, and then click on Rename Application Package.
Just change package name of your published and development version Application. Changing Package name is really very simple and easy, follow that post
https://stackoverflow.com/a/9171773/185022
The "published" version should be signed using a release keystore.
The "development" version should be signed using a debug keystore.
At installation time, Android will complain that the two applications (having the same package name) have different signatures, and won't install the latest one (Re-installation failed due to different application signatures.).
To fix this (normal) behavior, change the package name of your application while developing it (ex: com.example.myapp-dev).

Why does the app signature change in Android after a classpath change?

I have an Android project that branched into three different applications, app-1, app-2 and app-3, that apply some customizations. Currently there is a lot of code duplication, making maintenance a nightmare: do the changes in one of the branches, and then merge the other two.
So we create a library project, named app-core, that factors out most of the duplicated code. So far so good.
When I launch this into an emulator where the application was already loaded (before the refactoring), I get this exception:
Re-installation failed due to different application signatures
A different signature? But I just added a line in the .classpath to link to the app-core Java project!
The main question is: are the existing users going to be bothered by this too?
And the side question: Why is it a different signature?
The digital signature is driven by a signing key that exists on the machine that signs the app. If Developer A compiles an app using the standard debug key and installs it in an emulator, then tries installing some other variation of the app -- one signed with a production key, one signed with Developer B's debug key, etc. -- in the same emulator, you will get that error.
The main question is: are the existing
users going to be bothered by this
too?
Do you have the production signing key that you used for the version of the app your existing users are using? If yes, then there should be no problem. If no, you're screwed.
Uninstall the application on the device, then run code again, it will work. It happens for me and I tried same thing, now it is working correctly.
For this problem u need to check that the correct key is used under (Window->Preferences->Android->build).
This u can check from the android.mk file of the app.
And on placing the correct key path , CLEAN and BUILD the project to avoid this error .
I have had the similar kind of issue. If you are installing it on your device then you need to uninstall the app on your device prior to install it from eclipse. It will definitely solve your problem.
Cheers

Categories

Resources