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


50-TON HYDRAULIC RAM JACK porta power type cylinder lifting jacks rams picture

50-TON HYDRAULIC RAM JACK porta power type cylinder lifting jacks rams

$118.74



50 Ton Hydraulic Flat Jack Pancake Cylinder Ram 64MM for Machinery Industries US picture

50 Ton Hydraulic Flat Jack Pancake Cylinder Ram 64MM for Machinery Industries US

$109.24



M1187 Milling Machine Parts RAM Adapter Bridge Port Type J Head Milling Machine picture

M1187 Milling Machine Parts RAM Adapter Bridge Port Type J Head Milling Machine

$95.00



100Ton LOW HEIGHT Profile Hydraulic Cylinder Jack Ram Lifting 16mm Stroke picture

100Ton LOW HEIGHT Profile Hydraulic Cylinder Jack Ram Lifting 16mm Stroke

$124.27



RAM MODULE (COMES WITH WIRING HARDNESS) picture

RAM MODULE (COMES WITH WIRING HARDNESS)

$200.00



10000 PSI Manual Hydraulic Pump CP-700 For 4 & 10-Ton Hydraulic Ram Cylinder picture

10000 PSI Manual Hydraulic Pump CP-700 For 4 & 10-Ton Hydraulic Ram Cylinder

$90.25







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