Sub acceptEula_Click
prefs.Put("eula",True)
eulaText.Visible = False
acceptEula.Visible = False
ToastMessageShow("Thank you",False)
Sleep(3000)
If prefs.ContainsKey("authcode") Then
prefs.close
ui.Initialize(Activity,True)
ui.verify_user
Else
start_auth
End If
End Sub
Sub start_auth
Activity.RemoveAllViews
Activity.LoadLayout("authpage")
BLUFtools.FillImageToView(LoadBitmap(File.DirAssets,"fabio.png"),authBG)
Msgbox2Async("To link this app to your BLUF account, tap Start and then sign in to the website, and grant the app permission. Then tap Done at the top of the screen","Link your BLUF account","Start","","",Null,False)
Wait For Msgbox_Result (Result As Int)
blufclub.initialize(True)
authWeb.LoadUrl(blufclub.getAuthURL & "&token=" & BLUFtools.GetDeviceId)
authWeb.Visible = True
End Sub