I want to integrate the Firebase Push Notification with my asp,net website. But from what I read so far is that the token generated by B4J GetTokenValue is valid for 1 hour only.
So if I start B4J sending tool and copy the token string from there and use it in my asp.net this token will expire in 1 hour.
Is there any options to either convert GetTokenValue to vb.net /c# or to pass some parameters into B4J project?
I'm asking - is it possible to convert into C# or VB/NET this code
B4X:
Private Sub GetTokenValue (FilePath As String) As String
Dim GoogleCredentials As JavaObject
GoogleCredentials.InitializeStatic("com.google.auth.oauth2.GoogleCredentials")
Dim Credentials As JavaObject = GoogleCredentials.RunMethodJO("fromStream", Array(File.OpenInput(FilePath, ""))) _
.RunMethod("createScoped", Array(Array As String("https://www.googleapis.com/auth/firebase.messaging")))
Credentials.RunMethod("refreshIfExpired", Null)
Return Credentials.RunMethodJO("getAccessToken", Null).RunMethod("getTokenValue", Null)
End Sub