Intercept Incoming SMS

by Jorge Fonseca » Thu, 26 Mar 2009 00:36:56 GMT


Sponsored Links
 Hi All,

Does anyone known if its possible to intercept incoming SMS to my app?
Similar to PushRegister in JME.
I try to BroadcastReceiver - works fine but the SMS also goes to Native
Inbox app.

Regards,
Jorge.

--~--~---------~--~----~------------~-------~--~----~



Intercept Incoming SMS

by mark . kahrl » Fri, 27 Mar 2009 23:21:48 GMT


 That is because both your receiver and the onboard application both
grab the message from the same intent, intents can be captured by more
than one receiver, howerver your receiver cannot consume the intent
such that it is not available to other receivers.

         Mark



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Intercept Incoming SMS

by Tseng » Sun, 29 Mar 2009 01:24:42 GMT


 For security reasons this is not possible and works is "by design", to
prevent abuse and make it harder to run undetected malware on your
phone.



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Making sure activity is alive to receive Intent?

Why you did not start your activity by intent with state data
directly?
IMHO, you can not find a way to make sure intent being received in
time.

-- 

2. 1.5 SDK crashing on in onReceive for BroadcastReceiver

Hello,

I've come across a strange problem reported by an HTC Droid Eris user,
and all testing on the other SDK's shows it to be fine. In a
BroadcastReceiver I have the following:
public class SMSReceiver extends BroadcastReceiver {
           @Override
           public void onReceive(Context context, Intent intent) {
                   Bundle bundle = intent.getExtras();
                   Object[] pdusObj = (Object[]) bundle.get("pdus");
                   SmsMessage[] messages = new SmsMessage[pdusObj.length];
           }

Every time a text message is received, I get a force close with the
following in LogCat:
03-04 21:34:03.330: ERROR/AndroidRuntime(1243): Uncaught handler:
thread main exiting due to uncaught exception
03-04 21:34:03.400: ERROR/AndroidRuntime(1243): java.lang.VerifyError:
com.myapp.app.SMSReceiver
03-04 21:34:03.400: ERROR/AndroidRuntime(1243):     at
java.lang.Class.newInstanceImpl(Native Method)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243):     at
java.lang.Class.newInstance(Class.java:1472)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243):     at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2380)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243):     at
android.app.ActivityThread.access$2700(ActivityThread.java:112)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243):     at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1741)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243):     at
android.os.Handler.dispatchMessage(Handler.java:99)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243):     at
android.os.Looper.loop(Looper.java:123)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243):     at
android.app.ActivityThread.main(ActivityThread.java:3948)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243):     at
java.lang.reflect.Method.invokeNative(Native Method)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243):     at
java.lang.reflect.Method.invoke(Method.java:521)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243):     at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:782)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
03-04 21:34:03.400: ERROR/AndroidRuntime(1243):     at
dalvik.system.NativeStart.main(Native Method)


Any ideas would be appreciated. This seems to be working on every SDK
except for 1.5.

Thanks in advance!

-- 

3. How can i make a menu, wich doesn't hide?

4. surface manager, overlay

5. Oot ada androiders di jambi ga?

6. Accuracy in GPS Location

7. racoon service in Android init.rc