Sub Activity_Resume
UpdateIp
UpdateStatus
'AnotherProgressBar1.Visible = AnotherProgressBar1.Visible
UpdateFileProgress
If File.ExternalWritable = False Then
btnWirelessStart.Enabled = False
MsgboxAsync("ไม่มีการ์ดหน่วยความจำ โปรดแน่ใจว่าอุปกรณ์มีการเชื่อมต่อถูกต้อง", "")
Else If phone.SdkVersion >= 26 And CanRequestPackageInstalls = False Then
MsgboxAsync("โปรดอนุญาต B4A-Bridge สามารถติดตั้งแอพอื่นได้ ", "")
Wait For Msgbox_Result(Result As Int)
Dim in As Intent
in.Initialize("android.settings.MANAGE_UNKNOWN_APP_SOURCES", "package:" & Application.PackageName)
StartActivity(in)
Else If phone.SdkVersion < 26 And CheckNonMarketAppsEnabled = False Then
MsgboxAsync("โปรดอนุญาตให้มีการติดตั้งแอพนอกจาก Play Store โดยเลือก" & CRLF & "Under Settings - Security - Unknown sources" _
& CRLF & "Or Settings - Applications - Unknown sources", "")
Else
If phone.SdkVersion >= 29 And DrawOverRequested = False Then
DrawOverRequested = True
Wait For (GetDrawOverPermission) Complete (Success As Boolean)
End If
btnWirelessStart.Enabled = True
If firstTimeEnabledAutomaticatlly = False Then
firstTimeEnabledAutomaticatlly = True
btnWirelessStart_Click
End If
End If
UpdateThemeColors
'this is required in B4A only. It resumes the animation after the activity was paused.
ScrlblVersion.Text = ScrlblVersion.Text
mPhoneWakeState.KeepAlive(True)
Activity.RemoveAllViews '<====Addition code
Activity_Create(False) '<====Addition code
btnWirelessStart_Click '<====Addition code
End Sub