#Region Service Attributes
#StartAtBoot: False
#End Region
Sub Process_Globals
Private fm As FirebaseMessaging
Public MyFCMToken As String
Public ImHere As Timer
Public FCM_KEY As String = ""
Public MessType, MessNickName, MessFCMToken,MessMessage, MessFrom As String
Public ChatsMap As Map
Public MyName As String ="Klaus12345"
Public MyIp, MyNickname As String
Public MySocket As ServerSocket
End Sub
Sub Service_Create
fm.Initialize("fm")
MyFCMToken=fm.Token
Log (MyFCMToken)
Subscribe
ImHere.Initialize("ImHere",10000)
ImHere.Enabled=True
ChatsMap.Initialize
MySocket.Initialize(0,"")
MyIp=MySocket.GetMyWifiIP
If MyIp.StartsWith("127") Then
MyIp=MySocket.GetMyIP
End If
If MyIp.StartsWith("127") Then
CallSubDelayed(Main,"NoInternet")
End If
MyNickname=MyName&"_"&MyIp
Log(MyNickname)
End Sub
When using above code, getting an error,
Unknown type : firebasemessaging
Are u missing a library reference?
#StartAtBoot: False
#End Region
Sub Process_Globals
Private fm As FirebaseMessaging
Public MyFCMToken As String
Public ImHere As Timer
Public FCM_KEY As String = ""
Public MessType, MessNickName, MessFCMToken,MessMessage, MessFrom As String
Public ChatsMap As Map
Public MyName As String ="Klaus12345"
Public MyIp, MyNickname As String
Public MySocket As ServerSocket
End Sub
Sub Service_Create
fm.Initialize("fm")
MyFCMToken=fm.Token
Log (MyFCMToken)
Subscribe
ImHere.Initialize("ImHere",10000)
ImHere.Enabled=True
ChatsMap.Initialize
MySocket.Initialize(0,"")
MyIp=MySocket.GetMyWifiIP
If MyIp.StartsWith("127") Then
MyIp=MySocket.GetMyIP
End If
If MyIp.StartsWith("127") Then
CallSubDelayed(Main,"NoInternet")
End If
MyNickname=MyName&"_"&MyIp
Log(MyNickname)
End Sub
When using above code, getting an error,
Unknown type : firebasemessaging
Are u missing a library reference?
Last edited: