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


Kollmorgen AKD Servo Drive AKD-P00606-NBCC-0000 picture

Kollmorgen AKD Servo Drive AKD-P00606-NBCC-0000

$274.95



Honeywell Ultraviolet Flame Amplifier RM7890 A 1015 picture

Honeywell Ultraviolet Flame Amplifier RM7890 A 1015

$199.99



Phoenix Contact MINI MCR-SL-I-I MCR 3-way isolating amplifier - for electrica... picture

Phoenix Contact MINI MCR-SL-I-I MCR 3-way isolating amplifier - for electrica...

$333.07



Phoenix Contact 5607189 Isolation Amplifier picture

Phoenix Contact 5607189 Isolation Amplifier

$233.66



Phoenix Contact 2865382 Repeater Power Supply - Isolation Amplifier - Current... picture

Phoenix Contact 2865382 Repeater Power Supply - Isolation Amplifier - Current...

$580.87



New Genuine HONEYWELL R7861A1026 Ultraviolet Flame Amplifier In Box picture

New Genuine HONEYWELL R7861A1026 Ultraviolet Flame Amplifier In Box

$396.00







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