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
Highlighted
New Developer
Posts: 45
Registered: ‎08-16-2008
My Device: Torch 9800, Bold 9700, Storm 9550, Curve 8520
My Carrier: Airtel

SMS Application

Hi all,

I am developing an application for BlackBerry Pearl 8110 that will send and receive an SMS. I am able to send an SMS through the application. I want to do the following things with the application:

1. Run the application when the phone is switched on (like a background service) 


2. Grab an SMS which has a fixed five characters say "ABCDE" at the beginning and one character say "A" at the end. For extracting the beginning and end characters we can use CharAt() and SubString(), but before we extract it we need to grab the SMS and store it in some variable.

3. Invoke an application when the SMS comes in with the above criteria.

4. Do not let the SMS go into the SMS inbox (phone's inbox) or grab the SMS from the phone's inbox, whichever is possible

5. Navigate from one screen to another with the value from the previous screen.(i.e assigning some global variables and using them)

 

6. Use radio buttons for different options and when one of then is selected, then do some action like send message or go to the next page/screen


I am using BlackBery JDE 4.5

Regards
LTCCTL

Developer
Posts: 16,984
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: SMS Application

take a look at the sms samples that come with the JDE.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
BlackBerry Development Advisor
Posts: 15,693
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: SMS Application

1.  How To - Configure an application to start automatically when the device is turned on
Article Number: DB-00002

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800901/How_To_-_Confi...

 

2 What is - Different ways to listen for SMS messages
Article Number: DB-00579

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

 

3.  Refer to the JavaDocs for the Invoke class.

 

4.  How To - Use SMS to notify an application 
Article Number: DB-00533

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/How_To_...

 

5.  There are various ways to handle this.  You can create class/application level variables or pass the data in as a parameter to a custom screen.

 

6.  Please refer to the JavaDocs for the RadioButton, RadioButtonGroup and FieldChangedListener APIs.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 45
Registered: ‎08-16-2008
My Device: Torch 9800, Bold 9700, Storm 9550, Curve 8520
My Carrier: Airtel

Re: SMS Application

Thanks for your help.

 

I have created a menu system and when the menu options are clicked I display a button and on the click of that button I want to send an SMS to a particular number, but it gives an error: “java.lang.RunTimeException:application: already running in this process”

Can anyone please let me know how to overcome with that error.

 

 

Regards

LTCCTL 

BlackBerry Development Advisor
Posts: 15,693
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: SMS Application

What actions and line of code trigger the error?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 45
Registered: ‎08-16-2008
My Device: Torch 9800, Bold 9700, Storm 9550, Curve 8520
My Carrier: Airtel

Re: SMS Application

Hi all,

 

thanks for your support and reply.

 

I made a mistake while running the application

 

Now it is working fine.

 

thanks once again

 

Regards

LTCCTL

 

New Developer
Posts: 45
Registered: ‎08-16-2008
My Device: Torch 9800, Bold 9700, Storm 9550, Curve 8520
My Carrier: Airtel

Re: SMS Application

Hi all,

 

To solve that errorI just removed the extra "extends Uiapplication"

 

Regards

LTCCTL

Developer
Posts: 49
Registered: ‎02-25-2011
My Device: T Mobile 8900
My Carrier: Vodafone

Re: SMS Application

Hi,

 

Can anyone plaease share the code to send the sms message.

Thanks.

Thanks And Regards,
Nishant