BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-05-2008, 03:03 AM   #1 (permalink)
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Post Thanks: 4
Thanked 0 Times in 0 Posts
Unhappy access all SMS in my inbox through API

Please Login to Remove!

whether there are SMS or E-Mails,
is there any way or APIs that enable me to read them with my custom BBApplication?
Thanks in advance
Offline  
Old 08-05-2008, 04:02 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

sms: no
mails: yes. take a look at the developer guide for details
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 08-12-2008, 08:22 AM   #3 (permalink)
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Post Thanks: 4
Thanked 0 Times in 0 Posts
Talking

please refer the following APIs for the solution of your problem
Code:
import java.util.Date;
import net.rim.blackberry.api.mail.Address;
import java.io.ByteArrayOutputStream;
import net.rim.blackberry.api.mail.Folder;
import net.rim.blackberry.api.mail.Message;
import net.rim.blackberry.api.mail.Multipart;
import net.rim.blackberry.api.mail.Session;
import net.rim.blackberry.api.mail.Store;
import net.rim.blackberry.api.mail.TextBodyPart;
import net.rim.blackberry.api.mail.event.FolderEvent;
import net.rim.blackberry.api.mail.event.FolderListener;
import net.rim.blackberry.api.mail.event.MessageEvent;
import net.rim.blackberry.api.mail.event.MessageListener;
Offline  
Old 08-12-2008, 08:24 AM   #4 (permalink)
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Post Thanks: 4
Thanked 0 Times in 0 Posts
Talking

any ways the following should help you:
Code:
Store store = Session.waitForDefaultSession().getStore();

        //Folder[] drafts = store.list(Folder.DRAFT);
////2.Retrieve the message objects from the folder. Iterate through the array and retrieve information, such as the sender and subject, to display to the BlackBerry® device user.
        //        Folder inbox = store.list(Folder.INBOX);
        Folder[] outbox = store.list(Folder.OUTBOX);
        //Folder sentitems = store.list(Folder.SENT);
//         Message msg1 = new Message();
//         msg1.setSubject("Hello");
//        msg1.addMessageListener(this);
//        inbox.appendMessage(msg1);
////3.When a BlackBerry device user selects a message from the list, invoke methods on the Message object to retrieve the appropriate fields and body contents to display to the BlackBerry device user.
        Message[] msgs = outbox[0].getMessages();
        Message msg = msgs[0]; // Retrieve the first message.
        //Address[] recipients = msg.getRecipients(Message.RecipientType.TO);
        ///////////////////////////////

//...

        //Date sent = msg.getSentDate();
        //Address from = msg.getFrom();
        String subject = (String) msg.getSubject();
        String type = msg.getContentType();
//        Object o =  msg.getContent();
//        
        String msgBody=msg.getBodyText();
Offline  
Old 08-14-2008, 02:58 AM   #5 (permalink)
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Post Thanks: 4
Thanked 0 Times in 0 Posts
Unhappy

Ok I can access the E-Mails, but where are the SMS.
what is the name of the folder?
Using ESS Simulator I can send the E-Mails and find them in the
SENT folder
Code:
Folder[] sentitems = store.list(Folder.SENT);
But the sent SMS is not reported here.
Please Help.
Offline  
Old 08-14-2008, 03:19 AM   #6 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

you can not access any stored sms programatically.
you can intercept incoming sms, but that's it.

it is possible to read them from a backup file on your pc though.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 09-17-2008, 05:28 AM   #7 (permalink)
New Member
 
Join Date: Sep 2008
Model: 8100
PIN: N/A
Carrier: ATT
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by simon.hain View Post
you can not access any stored sms programatically.
you can intercept incoming sms, but that's it.

it is possible to read them from a backup file on your pc though.
Hi Simon! Thank you for your reply. It is really help for me. But ......
So I cannot access sms from the inbox. So Is there no way to get the sms data from the inbox.

My supervisor said that I must get sms data from Inbox. So What should I do?
Offline  
Old 09-17-2008, 09:33 AM   #8 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Find another job? ;)
Offline  
Old 09-19-2008, 06:06 AM   #9 (permalink)
Thumbs Must Hurt
 
shraddha294's Avatar
 
Join Date: Oct 2007
Location: Hyderabad
Model: 8800
PIN: N/A
Carrier: TMobile
Posts: 111
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by sweetsweet24 View Post
Hi Simon! Thank you for your reply. It is really help for me. But ......
So I cannot access sms from the inbox. So Is there no way to get the sms data from the inbox.

My supervisor said that I must get sms data from Inbox. So What should I do?
Tell them ... 'due to technological limitations' we cannot access the SMS in inbox... its not possible, means say no in technically wrapped terms .... managers have difficulty understanding that :D
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright © 2004-2014 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.