BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 08-05-2008, 02:03 AM   #1
abhsax1978@hotmail.com
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
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, 03:02 AM   #2
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

sms: no
mails: yes. take a look at the developer guide for details
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 08-12-2008, 07:22 AM   #3
abhsax1978@hotmail.com
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
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, 07:24 AM   #4
abhsax1978@hotmail.com
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
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, 01:58 AM   #5
abhsax1978@hotmail.com
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
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, 02:19 AM   #6
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
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, 04:28 AM   #7
sweetsweet24
New Member
 
Join Date: Sep 2008
Model: 8100
PIN: N/A
Carrier: ATT
Posts: 4
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, 08:33 AM   #8
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default

Find another job? ;)
Offline  
Old 09-19-2008, 05:06 AM   #9
shraddha294
Thumbs Must Hurt
 
shraddha294's Avatar
 
Join Date: Oct 2007
Location: Hyderabad
Model: 8800
PIN: N/A
Carrier: TMobile
Posts: 111
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



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

Forum Jump


Samsung MX55 Final Drive Motor.  MPN: 7115-15000 picture

Samsung MX55 Final Drive Motor. MPN: 7115-15000

$2100.00



Samsung Bespoke combo Very Good condition NQ70CG700DMT picture

Samsung Bespoke combo Very Good condition NQ70CG700DMT

$2395.00



SAMSUNG BP95-00077A ASSY SUB-PRO SCAN T11383 picture

SAMSUNG BP95-00077A ASSY SUB-PRO SCAN T11383

$75.00



Samsung KPOS71BMP1/XAR OfficeServ MP10 Processor with 4DLM Card picture

Samsung KPOS71BMP1/XAR OfficeServ MP10 Processor with 4DLM Card

$39.99



Genuine SAMSUNG Range Oven Relay Board DG92-01207D picture

Genuine SAMSUNG Range Oven Relay Board DG92-01207D

$99.95



Samsung, KM2816A-25, Integrated Circuit, New, Lot of 15 picture

Samsung, KM2816A-25, Integrated Circuit, New, Lot of 15

$225.00







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