문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top