following Version safe APK installation I have managed to download and install new version of my app from my site. Everything is working just fine, except when I install new version, it won't start automatically, must find it on apps and start it. I see it is new version, have label for that....
what am I doing wrong?
thanks....
what am I doing wrong?
thanks....
B4X:
Dim ApkName As String = "someapp.apk"
Dim i As Intent
If Phone.SdkVersion >= 24 Then
i.Initialize("android.intent.action.INSTALL_PACKAGE", CreateFileProviderUri(Starter.Provider.SharedFolder, ApkName))
i.Flags = Bit.Or(i.Flags, 1) 'FLAG_GRANT_READ_URI_PERMISSION
Else
i.Initialize(i.ACTION_VIEW, "file://" & File.Combine(Starter.Provider.SharedFolder, ApkName))
i.SetType("application/vnd.android.package-archive")
End If
StartActivity(i)