T tomoshea Member Licensed User Longtime User Jul 28, 2017 #1 Hi, I have a service module that intercepts SMS messages from a particular number and updates a table in a database. That part works fine - now I want the service module to start another app whenever a message is received. I cannot use something like Code: Copy Dim in As Intent Dim pm As PackageManager in = pm.GetApplicationIntent("com.xtralogic.android.rdpclient.trial") If in.IsInitialized Then in.SetComponent("com.xtralogic.android.rdpclient.trial/.HelpActivity") StartActivity(in) End If because when I add the phone library the following line Code: Copy If startingIntent.Action = "android.provider.Telephony.SMS_RECEIVED" Then in Sub Service_Start(startingIntent As Intent) gives an error 'Unknown member:Action' Any help would be greatly appreciated. Thank you, Tom
Hi, I have a service module that intercepts SMS messages from a particular number and updates a table in a database. That part works fine - now I want the service module to start another app whenever a message is received. I cannot use something like Code: Copy Dim in As Intent Dim pm As PackageManager in = pm.GetApplicationIntent("com.xtralogic.android.rdpclient.trial") If in.IsInitialized Then in.SetComponent("com.xtralogic.android.rdpclient.trial/.HelpActivity") StartActivity(in) End If because when I add the phone library the following line Code: Copy If startingIntent.Action = "android.provider.Telephony.SMS_RECEIVED" Then in Sub Service_Start(startingIntent As Intent) gives an error 'Unknown member:Action' Any help would be greatly appreciated. Thank you, Tom
Erel B4X founder Staff member Licensed User Longtime User Jul 30, 2017 #2 Are you using a very old version of B4A? Upvote 0
T tomoshea Member Licensed User Longtime User Jul 30, 2017 #3 Erel said: Are you using a very old version of B4A? Click to expand... No. I am using B4A Version 7.0. Upvote 0
Erel said: Are you using a very old version of B4A? Click to expand... No. I am using B4A Version 7.0.
Erel B4X founder Staff member Licensed User Longtime User Jul 31, 2017 #4 Can you upload the project? The Phone library shouldn't have any effect on the Intent object. Upvote 0
T tomoshea Member Licensed User Longtime User Jul 31, 2017 #5 Erel said: Can you upload the project? The Phone library shouldn't have any effect on the Intent object. Click to expand... I have made a small project to show the problem. I have included all the libraries that I currently use. Attachments ServiceTest.zip ServiceTest.zip 9.2 KB · Views: 440 Upvote 0
Erel said: Can you upload the project? The Phone library shouldn't have any effect on the Intent object. Click to expand... I have made a small project to show the problem. I have included all the libraries that I currently use.
T tomoshea Member Licensed User Longtime User Jul 31, 2017 #6 Erel said: Can you upload the project? The Phone library shouldn't have any effect on the Intent object. Click to expand... I have fixed the problem by uninstalling B4A V 7.0 and then re installing it. Thanks Erel for all your help. Upvote 0
Erel said: Can you upload the project? The Phone library shouldn't have any effect on the Intent object. Click to expand... I have fixed the problem by uninstalling B4A V 7.0 and then re installing it. Thanks Erel for all your help.