#Region Project Attributes
#ApplicationLabel: Test
#VersionCode: 1
#VersionName:
#additionaljar: com.android.support:support-v4
#BridgeLogger: true
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
Public fm As FirebaseMessaging
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Service_Create
fm.Initialize("fm")
CallSubDelayed(fm, "SubscribeToTopics")
End Sub
Public Sub SubscribeToTopics
fm.SubscribeToTopic("general") 'you can subscribe to more topics
End Sub
Sub Service_Start (StartingIntent As Intent)
If StartingIntent.IsInitialized And fm.HandleIntent(StartingIntent) Then Return
End Sub
Sub fm_MessageArrived (Message As RemoteMessage)
'Log("Message arrived")
'Log($"Message data: ${Message.GetData}"$)
Dim nb As NotificationBuilder
nb.initialize
nb.SmallIcon = "icon"
nb.Ticker = "Ticker"
nb.ContentTitle = "Title"
nb.ContentText = "Text"
nb.ContentInfo = "Info"
nb.SubText = "SubText"
nb.OnGoingEvent = True
nb.Notify(1)
End Sub
Sub Service_Destroy
End Sub