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


Implement Whisker Switch  picture

Implement Whisker Switch

$50.00



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

$17.99



Dusk to Dwan/Day Night Sensor, Photoelectric Switch, Photo Cell Sensor 110-277V picture

Dusk to Dwan/Day Night Sensor, Photoelectric Switch, Photo Cell Sensor 110-277V

$49.28



Vertical Float Switch: Sump Accessory -  picture

Vertical Float Switch: Sump Accessory -

$17.99



Square D 9013FSG2J21 Water Pump Pressure Switch, 30/50 PSI, DPST 9013 picture

Square D 9013FSG2J21 Water Pump Pressure Switch, 30/50 PSI, DPST 9013

$21.88



P3 100/V/SVB  MOELLER. EATON P3-100/V/SVB. BASE MOUNT 100 AMPS. SWITCH picture

P3 100/V/SVB MOELLER. EATON P3-100/V/SVB. BASE MOUNT 100 AMPS. SWITCH

$174.99







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