Domanda

I have developed 5 android applications and generated the 5 apk files with same keystore. Of the 5 apps, one app is the home app which contains a common database. All other apps are accessing the database using the content provider.

Now, I want the user to download the all 5 apk files through the OTA service. After the download completed the home app first get started to install and after the installation completed automatically the second app get started to install and likewise for all 5 apks. Is there anyway to achieve this?

È stato utile?

Soluzione

You can prompt an install

Intent promptInstall = new Intent(Intent.ACTION_VIEW) 
    .setData(Uri.parse("file:///path/to/your.apk")) 
    .setType("application/vnd.android.package-archive"; 
startActivityForResult(promptInstall);

One's the user has accepted and installed, you will get a callback on which you can invoke the next APK install. You could also use PackageManager to check if the user has installed the APK successfully

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top