BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 09-15-2008, 05:59 AM   #1
aamitgupta
New Member
 
Join Date: Sep 2008
Model: 9000
PIN: N/A
Carrier: Hutch
Posts: 3
Exclamation New in blackberry please help................Hi

Please Login to Remove!

Hi All,

I am new in blackberry development, i am making an application that listen incoming message, i read API for sms, but i want that application run in background but how i do not know please help me, and provide any example code that run without gui and run in background.

I made a demo application that only have main() function code is following..
When i run this application on netbeans ide, build fails, but no error shows.

Code:
import java.io.Reader;
import javax.microedition.io.Connector;
import javax.wireless.messaging.MessageConnection;
import javax.wireless.messaging.MessageListener;
import net.rim.device.api.system.Application;

public class demo extends Application implements MessageListener {
    
    public MessageConnection MsgConn;
    MessageListener MsgList;
    boolean done;
    Reader reader;

    public static void main(String[] args) {
        System.out.println("incoming messageA");
        demo dem = new demo();
        dem.acceptsForeground();
    }
    public void demo()
    {
        try
        {
            System.out.println("Incoming messageB");
            MsgConn = (MessageConnection)
            Connector.open("sms://:6222");
            MsgConn.setMessageListener(this);
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
    }
    public void notifyIncomingMessage(MessageConnection msgconn) {
        if(msgconn == MsgConn)
        {
            System.out.println("incoming message");
        }
    }
}

And one thing can we test incoming message listener in simulator or not, because in simple j2me we can.


Thanks,
Amit
Offline  
Old 09-15-2008, 06:37 AM   #2
JSanders
Crimson Tide Moderator
 
JSanders's Avatar
 
Join Date: Oct 2004
Location: North of the moss line
Model: Z30
OS: 7.0sumtin
PIN: t low
Carrier: Verizon
Posts: 41,921
Default

**moved to Developer section**
Offline  
Old 09-15-2008, 08:38 AM   #3
aamitgupta
New Member
 
Join Date: Sep 2008
Model: 9000
PIN: N/A
Carrier: Hutch
Posts: 3
Default

Can any body help me??????????????
Offline  
Old 09-15-2008, 09:13 AM   #4
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

have you looked at the RIM's developer guide?
Offline  
Old 09-15-2008, 09:23 AM   #5
aamitgupta
New Member
 
Join Date: Sep 2008
Model: 9000
PIN: N/A
Carrier: Hutch
Posts: 3
Default

can u send me the link.
Offline  
Old 09-15-2008, 09:42 AM   #6
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

Livelink - Redirection
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


Tektronix 7904 Oscilloscope Mainframe  w/ 2x 7A26 2x 7B92A Modules picture

Tektronix 7904 Oscilloscope Mainframe w/ 2x 7A26 2x 7B92A Modules

$399.97



Used National Instruments SCXI-1000 Mainframe 1200 1120 1160(2) 181445D-01 U2 picture

Used National Instruments SCXI-1000 Mainframe 1200 1120 1160(2) 181445D-01 U2

$299.95



Fluke Networks Versiv Modular Mainframe AS IS picture

Fluke Networks Versiv Modular Mainframe AS IS

$1100.00



Used Teseo Image Mainframe W/OVCM02B OALM02B Amplifier Research F3 picture

Used Teseo Image Mainframe W/OVCM02B OALM02B Amplifier Research F3

$999.95



Chroma 6312 DC Electronic Load Mainframe  picture

Chroma 6312 DC Electronic Load Mainframe

$239.96



SHC SYSTEM 6 MAINFRAME + Mixed Modules 6-562,6-201,6-402. picture

SHC SYSTEM 6 MAINFRAME + Mixed Modules 6-562,6-201,6-402.

$83.99







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