Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
Gremlins Old
#1  
Guest
Thanks Meter
Posts: n/a
Default Read SMS

Hello!
I have some difficulties to read SMS in my application : my application doesn't want to use the fonction SmsOpen in mode RECEIVE. Do you know the parameters to use in this function to read Sms?

Gremlins (and I'm not Gizmo!)
 
Cheesy
Old
#2  
Junior Member
Thanks Meter 0
Posts: 6
Join Date: Jan 2003
Location: Germany
funny as Gizmo asked me exact the same question via private mail ...

This was my response:
----------------------------------------
I've never used the function to read SMS messages but here is my suggestion:

check the return code of SmsOpen, it is probably SMS_E_RECEIVEHANDLEALREADYOPEN. According the SDK help it means, that another app has already opened and is using the provider. In most cases, that might be Inbox, so shut down the Inbox task befor you are running your code.

If your error code is different, check the meaning in the help file, look for SmsOpen -> SMS specific error codes.
 
jvd
Old
#3  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Jan 2003
Location: Calgary, Alberta, Canada
You don't have disable Inbox. The problem is the internal SMS handler - if you look in \Windows\Startup, you'll see a SMSHandler (I don't have a T-Mobile at the moment, so can't confirm the exact name). You need to get your application to start before it. In addition, you need to do a SmsSetMessageNotification() for both SMS_MSGTYPE_RAW as well as SMS_MSGTYPE_TEXT message types. Strangely, the code does not get the notification if you only set it for one of the two.
 
t_lex
Old
#4  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Mar 2003
Location: Berlin
I have a T-Mobile MDA. There is a folder called "AutoStart" in the Windows folder, so I guess the file called "SMSReceiver.exe" is the handler you were talking about. I named my application "aaamyapplication" in order to start it up first after a soft reset (There is actually no "startup" registry-entry either for "SMSReceiver" nor for my application... in the end I kicked "SMSReceiver" out).
Unfortunately receiving an SMS through my app does not work (but strangely the system is still able to receive SMS in spite of deleting "SMSReceiver").

Do you have a good guess what I should do? I would be grateful for any advice

t_lex
 
nutitija
Old
#5  
Member
Thanks Meter 0
Posts: 78
Join Date: Apr 2005
Location: Brisbane
Could some body be more specific on what Jvd said ??? i'm running an XDA2 and when i look in windows/startup i only get the followng :

CheckAutoRun
ChgDfLnk
IA_Caller_ID
MMReg
poutlook
stk
wifiIcon
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...