Private Sub Authenticate
#if B4J
PrepareServer
#End If
Dim link As String = BuildLink("https://accounts.google.com/o/oauth2/v2/auth", _
CreateMap("client_id": mClientId, _
"redirect_uri": GetRedirectUri, _
"response_type": "code", "scope": mScope))
#if B4A
Dim pi As PhoneIntents
StartActivity(pi.OpenBrowser(link))
#else if B4i
Main.App.OpenURL(link)
#else if B4J
fx.ShowExternalDocument(link)
#end if
End Sub