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


Dusk to Dawn Photocell Light Switch Auto ON Off Light Sensor Control Switch picture

Dusk to Dawn Photocell Light Switch Auto ON Off Light Sensor Control Switch

$55.88



DCI FOOT SWITCH PEDAL 2 POSITION 1/PK. SELECT SPS # 9406 picture

DCI FOOT SWITCH PEDAL 2 POSITION 1/PK. SELECT SPS # 9406

$132.99



GEYA ATS PC Dual Power Automatic Power 3Pole 100A 220V Transfer Switch Grid NEW picture

GEYA ATS PC Dual Power Automatic Power 3Pole 100A 220V Transfer Switch Grid NEW

$39.99



ELECTRIC COOLING FAN GROUND-ING THERMO-STAT SWITCH RADIATOR TEMP-ERATURE SENSOR picture

ELECTRIC COOLING FAN GROUND-ING THERMO-STAT SWITCH RADIATOR TEMP-ERATURE SENSOR

$19.95



MOES Charge Controller Dual Power Automatic Transfer Switch Solar Wind System picture

MOES Charge Controller Dual Power Automatic Transfer Switch Solar Wind System

$95.99



1/8-1/2 INCH NPT ELECTRIC RADIATOR FAN THERMOSTAT TEMP-ERATURE SENSOR SWITCH KIT picture

1/8-1/2 INCH NPT ELECTRIC RADIATOR FAN THERMOSTAT TEMP-ERATURE SENSOR SWITCH KIT

$19.95







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