Sub Class_Globals
Public oauth2 As GoogleOAuth2
Public ClientId As String = "*****"
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
oauth2.Initialize(Me, "oauth2", ClientId, "https://www.googleapis.com/auth/gmail.send")
End Sub
Private Sub B4XPage_Foreground
oauth2.CallFromResume(B4XPages.GetNativeParent(Me).GetStartingIntent)
End Sub