Private Sub CheckInstallationRequirements As ResumableSub
If File.ExternalWritable = False Then
MsgboxAsync("Storage card not available. Make sure that your device is not connected in USB storage mode.", "")
Return False
Else If phone.SdkVersion >= 26 And apkupdt.CanRequestPackageInstalls = False Then
MsgboxAsync("Please allow me to install applications.", "")
Wait For Msgbox_Result(Result As Int)
Dim in As Intent
in.Initialize("android.settings.MANAGE_UNKNOWN_APP_SOURCES", "package:" & Application.PackageName)
StartActivity(in)
Wait For Activity_Resume '<-- wait for Activity_Resume
Return apkupdt.CanRequestPackageInstalls
Else If apkupdt.CheckNonMarketAppsEnabled = False Then
MsgboxAsync("Please enable installation of non-market applications." & CRLF & "Under Settings - Security - Unknown sources" _
& CRLF & "Or Settings - Applications - Unknown sources", "")
Return False
Else
Return True ' <------- It only goes through here. -------------------------
End If
End Sub