Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Gunjan
Posts: 50
Registered: ‎09-01-2009
My Device: Not Specified

get messages from inbox

hi 

 

I want to get all the messages that are in inbox. i read API but could not find the way i can do it with API.. can you please tell me how can i do this? and also want to genegrate CSV file containing all that messages that are in inbox.

 

 

Developer
kanaksony
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: get messages from inbox

Dear Gunjan, Its not possible to retrieve SMS once it has arrived in the device. U can only intercept them by using Listeners. Thanks & Regards
Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Developer
Gunjan
Posts: 50
Registered: ‎09-01-2009
My Device: Not Specified

Re: get messages from inbox

hey thanks.

 

i have use SMS demo but how can eliminate the use SMSServer?

I have one listener thread to receive message when arrive it works fine when server is running and does not work when it is stop

 

 

Developer
kanaksony
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: get messages from inbox

Can you pls explain us what you actually want to do, so that we can reply you to that specific point.
Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Developer
Gunjan
Posts: 50
Registered: ‎09-01-2009
My Device: Not Specified

Re: get messages from inbox

[ Edited ]

hey

 

I want to develop one app in which it listen for all the incoming for message and each day it collects all the sms that has been receive on that day and then export it to CSV file.

 

in order to that i refer SMSDemo and find out how to send n receive messages but whenever i send any message from my application i dont get it in my outbox....if i send from bb's message applicaiton i can see it in my outbox.

 

Please help me.

 

Thanks

Gunjan

Developer
kanaksony
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: get messages from inbox

[ Edited ]

you will have to

 

1) create a class which will open "MessageConnection"

2)You will have implement "javax.wireless.messaging.MessageListener" to intercept all incoming msgs. Next, add this listener to above connection.

3) You can retrieve all the details of intercepted incoming msg by using "javax.wireless.messaging.Message" class.

4) Save these info in persistent DB.

 

Rest I have no idea about importing this info in CSV format..:smileyindifferent: So, we shud wait for others to participate in it.:smileyhappy:

 

 

Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro
Developer
Gunjan
Posts: 50
Registered: ‎09-01-2009
My Device: Not Specified

Re: get messages from inbox

hi

 

I have implemented all the steps and am able to send SMS,Receive SMS notification, receive message. but the i cant find the message that i just in my outbox.....and can find it in my inbox. why is it happening?

Developer
kanaksony
Posts: 571
Registered: ‎04-11-2009
My Device: BB 10 Dev Alpha

Re: get messages from inbox

I guess you have not specified port number of your simulator. You must go thru following thread.

 

http://supportforums.blackberry.com/t5/Java-Development/How-to-sent-sms-from-one-simulator-to-anothe...

 

Regards,
Kanak Sony
------------------------------------------------------------------------------------------
http://dodevelopnshare.wordpress.com/ | http://www.linkedin.com/profile/view?id=188131481&trk=tab_pro