I want to be able to update my app from a website using FTP so I have a service within the app that checks for a new version of the APK file and downloads it. Each time the app is run it checks for the existence of a new APK file, i.e. a previously downloaded one, and if found does:
Dim myapp As String
Dim Intent1 As Intent
myapp = "file://" & apkPath & "/" & APKfullname
Intent1.Initialize(Intent1.ACTION_VIEW, myapp)
Intent1.SetType("application/vnd.android.package-archive")
StartActivity(Intent1)
What happened was that the Install dialog was displayed but then the app continued to run and it was only when I exited the app that the install resumed. So I put an Activity.Finish after the StartActivity(Intent1) and as this is done before much else in Main I thought the Activity.Finish would exit the app and allow the install to run. Not so, it seemed that the Activity.Finish made no difference. Puzzling to me!
Ta.
Dim myapp As String
Dim Intent1 As Intent
myapp = "file://" & apkPath & "/" & APKfullname
Intent1.Initialize(Intent1.ACTION_VIEW, myapp)
Intent1.SetType("application/vnd.android.package-archive")
StartActivity(Intent1)
What happened was that the Install dialog was displayed but then the app continued to run and it was only when I exited the app that the install resumed. So I put an Activity.Finish after the StartActivity(Intent1) and as this is done before much else in Main I thought the Activity.Finish would exit the app and allow the install to run. Not so, it seemed that the Activity.Finish made no difference. Puzzling to me!
Ta.