Slacker Active Member Licensed User Longtime User May 5, 2014 #1 Hello folks, the question is simple ( i guess... ) Is it possibile to intercept ( and handle ) an sms message and incoming calls in background ( choosing in advance if send standard system notify or suppressing it completely ) by using PhoneEvents inside a Service ( registering it in manifest as Static Receiver ) ? If not, what it could be the best to achieve this result ( some piece of a minimal code could be useful please ) ? Thank you ! Last edited: May 5, 2014
Hello folks, the question is simple ( i guess... ) Is it possibile to intercept ( and handle ) an sms message and incoming calls in background ( choosing in advance if send standard system notify or suppressing it completely ) by using PhoneEvents inside a Service ( registering it in manifest as Static Receiver ) ? If not, what it could be the best to achieve this result ( some piece of a minimal code could be useful please ) ? Thank you !
Erel B4X founder Staff member Licensed User Longtime User May 6, 2014 #2 It is possible to intercept SMS messages and calls with static receivers: Intent Filters - Intercepting SMS messages in the background It is not possible to abort the intents. Note that starting from Android 4.4 it is not possible to abort SMS messages. In order to use PhoneEvents in the background you need to make sure that the process is running all the time. This can be done with a foreground service. Upvote 0
It is possible to intercept SMS messages and calls with static receivers: Intent Filters - Intercepting SMS messages in the background It is not possible to abort the intents. Note that starting from Android 4.4 it is not possible to abort SMS messages. In order to use PhoneEvents in the background you need to make sure that the process is running all the time. This can be done with a foreground service.
Slacker Active Member Licensed User Longtime User May 6, 2014 #3 Erel said: It is possible to intercept SMS messages and calls with static receivers: Intent Filters - Intercepting SMS messages in the background It is not possible to abort the intents. Note that starting from Android 4.4 it is not possible to abort SMS messages. In order to use PhoneEvents in the background you need to make sure that the process is running all the time. This can be done with a foreground service. Click to expand... What do you mean it's not possible to abort SMS Message ? I hope is possible to get the intent and handling it, to do not show any track about the sms received ( imaging i want silently delete a sms message.. is it possible i think... ) ? Regards PhoneEvents you mean i cannot use it as setting a Service as Static Receiver ( Handling the manifest in following way ) ? Code: Copy AddReceiverText(Listener, <intent-filter> <action android:name="android.intent.action.PHONE_STATE" /> <action android:name="android.provider.Telephony.SMS_RECEIVED" /> </intent-filter>) Upvote 0
Erel said: It is possible to intercept SMS messages and calls with static receivers: Intent Filters - Intercepting SMS messages in the background It is not possible to abort the intents. Note that starting from Android 4.4 it is not possible to abort SMS messages. In order to use PhoneEvents in the background you need to make sure that the process is running all the time. This can be done with a foreground service. Click to expand... What do you mean it's not possible to abort SMS Message ? I hope is possible to get the intent and handling it, to do not show any track about the sms received ( imaging i want silently delete a sms message.. is it possible i think... ) ? Regards PhoneEvents you mean i cannot use it as setting a Service as Static Receiver ( Handling the manifest in following way ) ? Code: Copy AddReceiverText(Listener, <intent-filter> <action android:name="android.intent.action.PHONE_STATE" /> <action android:name="android.provider.Telephony.SMS_RECEIVED" /> </intent-filter>)
DonManfred Expert Licensed User Longtime User May 6, 2014 #4 As far as i know starting from android 4.4 only ONE messanging-app can be the default one to handle SMS. And only this app can remove SMSs. Upvote 0
As far as i know starting from android 4.4 only ONE messanging-app can be the default one to handle SMS. And only this app can remove SMSs.
Slacker Active Member Licensed User Longtime User May 6, 2014 #5 Thank you Don. I need to intercept ( further the phone calls ) the sms messages and, based on the user settings in my app, remove them silently if they are from unwanted sender. I need also to remove them from the default Android system database leaving any track about it/them. If this task cannot be accomplish in Android 4.4, this is pretty shitty restriction I hope someone could give more precise informations it about, please. Upvote 0
Thank you Don. I need to intercept ( further the phone calls ) the sms messages and, based on the user settings in my app, remove them silently if they are from unwanted sender. I need also to remove them from the default Android system database leaving any track about it/them. If this task cannot be accomplish in Android 4.4, this is pretty shitty restriction I hope someone could give more precise informations it about, please.
Erel B4X founder Staff member Licensed User Longtime User May 7, 2014 #6 See this discussion: http://www.b4x.com/android/forum/th...ssages-without-notification-android-4-4.37171 Upvote 0
See this discussion: http://www.b4x.com/android/forum/th...ssages-without-notification-android-4-4.37171