是否可以在后台使用 smsInterceptor?我正在尝试为此使用服务,但它不起作用,它不会在 MessageReceived 事件上为我发送短信。
'Service module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim smsint As SmsInterceptor
End Sub
Sub Service_Create
smsint.Initialize("smsint")
End Sub
Sub Service_Start (StartingIntent As Intent)
StartServiceAt("", DateTime.Now + 30 * DateTime.TicksPerSecond, True)
End Sub
Sub Service_Destroy
End Sub
Sub MessageReceived (From As String, Body As String)
ToastMessageShow(From & " - " & Body, True)
End Sub
这可能是错误的,我还没有弄清楚怎么做。阅读服务模块线程,但没有让我到任何地方:/