How can I copy a SMS received to another program?

68 views
Skip to first unread message

Rafael K. Barizon

unread,
Oct 11, 2013, 12:22:41 PM10/11/13
to codenameone...@googlegroups.com
Hi, I'm in need to know how can I copy a SMS received to another program, 
I need to read if the SMS received is from one number and if it is from that number I need to "catch" this SMS and show in my program, and I don't know how to read when I receive this SMS, or how the phone works receiving the message, what can I do in my program to connect with the SMS listener ?

Sorry for my bad english.

Shai Almog

unread,
Oct 11, 2013, 3:49:57 PM10/11/13
to codenameone...@googlegroups.com
No you can't.
In native Android code there might be some tricks but its problematic since what you are describing is effectively a virus/spyware.
iOS doesn't allow SMS interception at all.

Rafael K. Barizon

unread,
Oct 11, 2013, 6:36:05 PM10/11/13
to codenameone...@googlegroups.com
what I'm doing is one program to my research group, my orientator ask me to do that, I need to read if one message from a number x was received and I need to read this and show in another program, but if this I can't do, thanks 

Rafael K. Barizon

unread,
Oct 16, 2013, 11:44:12 AM10/16/13
to codenameone...@googlegroups.com
I was talking with my teacher and he said I didn't expressed myself right.
I need the phone initiates my app when a new message is received, sending this message to it. My purpose is to process the data sent using agricultural simulation models. The idea is to develop an alert app in order to predict diseases in crops such as soybeans and wheat.
E.g. the phone received the message "I06T43H85" sent by a specific number. The program separates the message in three parts, and shows its translation: I06 = Id from the station (station 6), T43 = Temperature 43ºC, H85 = relative Humidity 85%.
So I need to know how can I do that, how can the phone when receive one SMS activate the other program to show the message, and if that is possible using Codenameone resources.

Thanks for your answer!

On Friday, October 11, 2013 4:49:57 PM UTC-3, Shai Almog wrote:

Shai Almog

unread,
Oct 16, 2013, 2:46:12 PM10/16/13
to codenameone...@googlegroups.com
If the message is an SMS message then no we don't support that.
Only Android supports some form of intercepting SMS's (to be fair J2ME does too but its problematic). The issue here is that Android does it in a way that's really hard to express across platforms and its a very low level feature.

If by message you mean something more generic then you can use push notifications which should work fine for iOS/Android but are a pro only feature.
Reply all
Reply to author
Forward
0 new messages