BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-17-2008, 10:04 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Sockets with Blackberry?

Please Login to Remove!

I'm working in a program, but i also have many doubts about it and hopefully you guys can help me with that...

This program would basically just sit there, and have a list of "names" or whatever...it would wait until it receive some kinda of "data", from a Computer, or from another phone... the only way i thought about doing it was to use sockets
i would make an app, for the phone to receive data...i would make another app for the computer to send data...and i would make another app for other phones to send data...
Now first i wanted to know if that is possible? or if there is any other way i could do it without using sockets?
and the phone, sinse it's connected to the internet, does it have an personal IP? or how do i find the phone using a computer?

hope someone can help me... ._.
Offline  
Old 07-17-2008, 10:37 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

one of the ways suggested here earlier was to send data per e-mail and write a messagelistener to listen for the "special" messages and process them
Offline  
Old 07-17-2008, 11:06 AM   #3 (permalink)
MBW
Talking BlackBerry Encyclopedia
 
MBW's Avatar
 
Join Date: May 2008
Model: 8110
PIN: N/A
Carrier: AT&T
Posts: 393
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Would the Web Signals API help?
__________________
/\/\\/\/
Offline  
Old 07-17-2008, 11:15 AM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

uhmmm
don't even know what's that...
but the email thing sounds like an amazing idea...

but how do i add a listener for the email?
can you put a small example for me or something?
Offline  
Old 07-18-2008, 08:03 AM   #5 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

Have a look at the Blackberry Developers Knowledge Base article DB-00153. This message listening is an effective technique.

If you can use a BES or Unite server there is also the push listener described in DB-00434 for the Blackberry side, other articles describe the server side.

Web Signals, that MBW has been trumpeting, is a newly released protocol from RIM. There is very little hard information available but presumably it is the BIS equivalent of the push protocol supported by BES and Unite, it is similar if not identical to the facilities used by the various channel content providers to push things like the weather or sports scores to Blackberries.

Getting access to the Web Signals API is not as straight forward as is setting up a BES or Unite server. I have just started the process and will let the community know if I find out anything of interest.
Offline  
Old 07-18-2008, 09:43 AM   #6 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

so...here's what's happening

i'm trying to add the inboxFolder in a listener, so i can keep track of all the emails that the phone is going to receive


now i'm getting a bunch of errors, and i'm not sure of how can i solve it, so if anyone can help me please...


here is the part of the code that actually metters:

Code:
[...]
public static void main(String[]args) {
        try {
            Store s = Session.waitForDefaultSession().getStore();
            store.addFolderListener(new FolderListener() {
            public void messagesAdded(FolderEvent e) {
                if( e.getMessage().isInbound() == true )
                {
                    //message is a new received message
                    //perform some task here
                }
            }
            //implement other FolderListener methods
            //...
            });
            Folder[] folders = s.list(Folder.INBOX);
            Folder inbox = folders[0];
            inbox.addFolderListener(this);
        }
        catch (Exception e) {
        }
        Testdebugger n = new Testdebugger();
        n.enterEventDispatcher();
    }


and here are the errors i'm getting:

Quote:
Building dd
C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\rapc.exe -quiet import=..\lib\net_rim_api.jar codename=dd dd.rapc warnkey=0x52424200;0x52525400;0x52435200 "C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Testdebugger.java"
C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Testdebugger.java:12: cannot find symbol
symbol : class event
location: package net.rim.blackberry.api.mail
import net.rim.blackberry.api.mail.event;
^
C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Testdebugger.java:14: package net.rim.blackberry.api.main does not exist
import net.rim.blackberry.api.main.Message;
^
C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Testdebugger.java:23: <anonymous com.rim.samples.device.helloworlddemo.Testdebugger $1> is not abstract and does not override abstract method messagesRemoved(net.rim.blackberry.api.mail.event. FolderEvent) in net.rim.blackberry.api.mail.event.FolderListener
public void messagesAdded(FolderEvent e) {
^
C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Testdebugger.java:22: cannot find symbol
symbol : variable store
location: class com.rim.samples.device.helloworlddemo.Testdebugger
store.addFolderListener(new FolderListener() {
^
C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Testdebugger.java:35: non-static variable this cannot be referenced from a static context
inbox.addFolderListener(this);
^
C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Testdebugger.java:35: addFolderListener(net.rim.blackberry.api.mail.even t.FolderListener) in net.rim.blackberry.api.mail.Folder cannot be applied to (com.rim.samples.device.helloworlddemo.Testdebugge r)
inbox.addFolderListener(this);
^
6 errors
Error!: Error: java compiler failed: javac -source 1.3 -target 1.1 -g -O -d C:\DOCUME~1\PETROB~1\LOCALS~1\Temp\rapc_31758c2e.d ir -bootcl ...
Error while building project
so yea
anyone has any idea of what should i do?
Offline  
Old 07-18-2008, 09:52 AM   #7 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

sorry...
i fixed most of the problems
but i still have two that i can't figure out
take a look at the thing now :


CODE:
Code:
package com.rim.samples.device.helloworlddemo;

import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.RichTextField;
import net.rim.device.api.system.EventLogger;
import net.rim.blackberry.api.mail.Session;
import net.rim.blackberry.api.mail.Store;
import net.rim.blackberry.api.mail.Folder;
import net.rim.blackberry.api.mail.event.FolderListener;
import net.rim.blackberry.api.mail.event.FolderEvent;

final class Testdebugger extends UiApplication implements FolderListener {
    public static void main(String[]args) {
        try {
            Store s = Session.waitForDefaultSession().getStore();
            s.addFolderListener(new FolderListener() {
            public void messagesAdded(FolderEvent e) {
                if( e.getMessage().isInbound() == true )
                {
                    //message is a new received message
                    //perform some task here
                }
            }
            public void messagesRemoved(FolderEvent e) {
            }
            //implement other FolderListener methods
            //...
            });
            Folder[] folders = s.list(Folder.INBOX);
            Folder inbox = folders[0];
            inbox.addFolderListener(this);
        }
        catch (Exception e) {
        }
        Testdebugger n = new Testdebugger();
        n.enterEventDispatcher();
    }
    Testdebugger() {
        pushScreen(new TestScreen());
    }
}
final class TestScreen extends MainScreen {
    public TestScreen() {
        LabelField title = new LabelField ("OMG IT WORKS", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
        setTitle(title);
    }
}

Build:

Code:
Building dd
C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\rapc.exe  -quiet import=..\lib\net_rim_api.jar codename=dd dd.rapc warnkey=0x52424200;0x52525400;0x52435200 "C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Testdebugger.java"
C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Testdebugger.java:16: com.rim.samples.device.helloworlddemo.Testdebugger is not abstract and does not override abstract method messagesRemoved(net.rim.blackberry.api.mail.event.FolderEvent) in net.rim.blackberry.api.mail.event.FolderListener
final class Testdebugger extends UiApplication implements FolderListener {
      ^
C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Testdebugger.java:35: non-static variable this cannot be referenced from a static context
            inbox.addFolderListener(this);
                                    ^
2 errors
Error!: Error: java compiler failed: javac -source 1.3 -target 1.1 -g -O -d C:\DOCUME~1\PETROB~1\LOCALS~1\Temp\rapc_314d5b0c.dir -bootcl ...
Error while building project
Offline  
Old 07-18-2008, 10:27 AM   #8 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

You must have a concrete implementation of the abstract method messagesRemoved(). If you are not monitoring the removal of messages, then just create an empty method.
Offline  
Old 07-18-2008, 10:32 AM   #9 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok, i did that and received another kind of error.
here it goes

Code:
final class Testdebugger extends UiApplication implements FolderListener {
      ^
C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Testdebugger.java:35: non-static variable this cannot be referenced from a static context
            inbox.addFolderListener(this);
                                    ^
and all i changed from the previous code was that i added:

Code:
            public void messagesRemoved(FolderEvent e) {
            }
Offline  
Old 07-18-2008, 10:44 AM   #10 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok..i almost solved everything
it's only one left, but i don't know what to do with it
look:

Code:
package com.rim.samples.device.helloworlddemo;

import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.RichTextField;
import net.rim.device.api.system.EventLogger;
import net.rim.blackberry.api.mail.Session;
import net.rim.blackberry.api.mail.Store;
import net.rim.blackberry.api.mail.Folder;
import net.rim.blackberry.api.mail.event.FolderListener;
import net.rim.blackberry.api.mail.event.FolderEvent;

final class Testdebugger extends UiApplication implements FolderListener {
    public static void main(String[]args) {
        Testdebugger n = new Testdebugger();
        n.enterEventDispatcher();
    }
    Testdebugger() {
        Store s;
        try {
            s = Session.waitForDefaultSession().getStore();
            s.addFolderListener(new FolderListener() {
            public void messagesAdded(FolderEvent e) {
                if( e.getMessage().isInbound() == true )
                {
                    //message is a new received message
                    //perform some task here
                }
            }
            public void messagesRemoved(FolderEvent e) {
            }
            //implement other FolderListener methods
            //...
            });
        }
        catch (Exception e) {
        }
        Folder[] folders = s.list(Folder.INBOX);
        Folder inbox = folders[0];
        inbox.addFolderListener(this);
        pushScreen(new TestScreen());
    }
}
final class TestScreen extends MainScreen {
    public TestScreen() {
        LabelField title = new LabelField ("OMG IT WORKS", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
        setTitle(title);
    }
}
I moved almost all the main to the constructor
so that i could use the (this).
but now look at the error i'm getting:

Code:
C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\Testdebugger.java:16: com.rim.samples.device.helloworlddemo.Testdebugger is not abstract and does not override abstract method messagesRemoved(net.rim.blackberry.api.mail.event.FolderEvent) in net.rim.blackberry.api.mail.event.FolderListener
final class Testdebugger extends UiApplication implements FolderListener {
      ^
againt saying that i didn't overrite the messagesRemoved...
BUT I DID :(

i don't know where to put it anymore
Offline  
Old 07-18-2008, 10:59 AM   #11 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

oh...and i got one other question that is paralel...

the thing is...i moved everything to the constructor now...
is it still going to run as soon as the blackberry goes one? and it's going to still keep track of all the emails the person receives?
Offline  
Old 07-22-2008, 04:45 PM   #12 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by hrbuckley View Post
Have a look at the Blackberry Developers Knowledge Base article DB-00153. This message listening is an effective technique.

If you can use a BES or Unite server there is also the push listener described in DB-00434 for the Blackberry side, other articles describe the server side.

Web Signals, that MBW has been trumpeting, is a newly released protocol from RIM. There is very little hard information available but presumably it is the BIS equivalent of the push protocol supported by BES and Unite, it is similar if not identical to the facilities used by the various channel content providers to push things like the weather or sports scores to Blackberries.

Getting access to the Web Signals API is not as straight forward as is setting up a BES or Unite server. I have just started the process and will let the community know if I find out anything of interest.

How does BES or Unite server work? and how do i know if i can use that?
is that something special that depends on the BlackBerry cause some have BES, or what?
Offline  
Old 07-22-2008, 05:07 PM   #13 (permalink)
Thumbs Must Hurt
 
Join Date: Dec 2005
Model: 8310
Carrier: Rogers
Posts: 138
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

A couple quick comments and I'm not trying to jerk.

You really need to learn the java language fundamentals, specifically the concepts of inheritance and polymorphism. The stuff you're working on right now is way over your head, but it's good you're trying to learn.

Also to any admins, the number of views on this thread should certainly turn heads... it's up to 16,000 or so and it was created just a couple days ago, which insinuates to me someone is pinging it with a bot.
Offline  
Old 07-23-2008, 07:34 AM   #14 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Java Coding

Hi!

This may be a little long, so take some No-Doz or some Jolt and bear with me.

Your "TestDebugger" class is declared to implement "FolderListener". This means that the methods declared by FolderListener are expected (by the compiler) to be implemented as methods of TestDebugger. So if the FolderListener interface declares a method of "public void messagesAdded( FolderEvent e )", then there must be a method implemented in TestDebugger with that same signature. Without it, the compiler will throw a hissy-fit because you promised it that TestDebugger would comply with the implementation declared in FolderListener, and then you reneged on your promise.

In your TestDebugger constructor, you are creating a new FolderListener() on the fly. You are adding the implementation of "messagesAdded" on the fly. This is not a bad thing, but it then leaves open the question of why you need TestDebugger to implement the FolderListener interface, since you're creating an OTF class to do just that. Then, just before your call to pushScreen at the end of the constructor, you're also adding another FolderListener to the session, the TestDebugger object that's just being created (note: in general, you want to shy away from adding "this" to potentially some other process while in the constructor: if it gets used by the other process before the constructor is completed, Bad Things can happen).

If you want TestDebugger to be a FolderListener:
  1. Remove the ad hoc FolderListener you're creating on the fly
  2. Implement the FolderListener interface methods within TestDebugger as methods of TestDebugger
  3. At the end of the TestDebugger constructor, add "this" to the session as a FolderListener

If TestDebugger is your main application class, you might consider creating a TDFolderListener class, whose job it is to act as a FolderListener. TDFolderListener could maintain a reference to the TestDebugger class (pass it in as a param to its constructor), and call public methods of TestDebugger whenever it responds to a FolderListener method being called on it. Separation of code tends to reduce problems in the sense that each code module does one thing and one thing only, and thus is usually easier to get working and to debug (if it's not working).

One more thing to be wary of: Session.waitForDefaultSession() is a blocking call. This means that the thread containing it will block execution until it returns. Usually this happens in a few microseconds. However, the BlackBerry OS does not appreciate applications that - effectively - hang in their main thread of execution. So you may need a separate thread that handles setting up the FolderListener stuff, which even more suggests creating a completely separate class just to be the FolderListener.

Good Luck!

Cheers,

karl
__________________
Karl G. Kowalski
---------------
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!
Offline  
Old 07-23-2008, 08:09 AM   #15 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by CELITE View Post
A couple quick comments and I'm not trying to jerk.

You really need to learn the java language fundamentals, specifically the concepts of inheritance and polymorphism. The stuff you're working on right now is way over your head, but it's good you're trying to learn.

Also to any admins, the number of views on this thread should certainly turn heads... it's up to 16,000 or so and it was created just a couple days ago, which insinuates to me someone is pinging it with a bot.
even though you're not trying to be a jerk you were.
this is a forum to help people and with your post you didn't help ANYONE, just created one more message to be left in this post...

don't even come talk about my post, i'm trying to get my help here
admins should ban this kind of people that think they are smart, but can't help anyone...
step out then and leave for the nice (and smart) people to help me, because obviously you can only say bad stuff about things.
Offline  
Old 07-23-2008, 08:13 AM   #16 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by holy3daps View Post
Hi!

This may be a little long, so take some No-Doz or some Jolt and bear with me.

Your "TestDebugger" class is declared to implement "FolderListener". This means that the methods declared by FolderListener are expected (by the compiler) to be implemented as methods of TestDebugger. So if the FolderListener interface declares a method of "public void messagesAdded( FolderEvent e )", then there must be a method implemented in TestDebugger with that same signature. Without it, the compiler will throw a hissy-fit because you promised it that TestDebugger would comply with the implementation declared in FolderListener, and then you reneged on your promise.

In your TestDebugger constructor, you are creating a new FolderListener() on the fly. You are adding the implementation of "messagesAdded" on the fly. This is not a bad thing, but it then leaves open the question of why you need TestDebugger to implement the FolderListener interface, since you're creating an OTF class to do just that. Then, just before your call to pushScreen at the end of the constructor, you're also adding another FolderListener to the session, the TestDebugger object that's just being created (note: in general, you want to shy away from adding "this" to potentially some other process while in the constructor: if it gets used by the other process before the constructor is completed, Bad Things can happen).

If you want TestDebugger to be a FolderListener:
  1. Remove the ad hoc FolderListener you're creating on the fly
  2. Implement the FolderListener interface methods within TestDebugger as methods of TestDebugger
  3. At the end of the TestDebugger constructor, add "this" to the session as a FolderListener

If TestDebugger is your main application class, you might consider creating a TDFolderListener class, whose job it is to act as a FolderListener. TDFolderListener could maintain a reference to the TestDebugger class (pass it in as a param to its constructor), and call public methods of TestDebugger whenever it responds to a FolderListener method being called on it. Separation of code tends to reduce problems in the sense that each code module does one thing and one thing only, and thus is usually easier to get working and to debug (if it's not working).

One more thing to be wary of: Session.waitForDefaultSession() is a blocking call. This means that the thread containing it will block execution until it returns. Usually this happens in a few microseconds. However, the BlackBerry OS does not appreciate applications that - effectively - hang in their main thread of execution. So you may need a separate thread that handles setting up the FolderListener stuff, which even more suggests creating a completely separate class just to be the FolderListener.

Good Luck!

Cheers,

karl
yea, that's very helpful, thank you

i also didn't read a lot about FolderListener, i just tried to implement it in my main class, which didn't end up pretty well...
but thanks for the help dude, i'll try that
Offline  
Old 07-23-2008, 04:59 PM   #17 (permalink)
Thumbs Must Hurt
 
Join Date: Dec 2005
Model: 8310
Carrier: Rogers
Posts: 138
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Aiwa View Post
even though you're not trying to be a jerk you were.
this is a forum to help people and with your post you didn't help ANYONE, just created one more message to be left in this post...

don't even come talk about my post, i'm trying to get my help here
admins should ban this kind of people that think they are smart, but can't help anyone...
step out then and leave for the nice (and smart) people to help me, because obviously you can only say bad stuff about things.

Hey hey, no need to get angry. I'm trying to help you out here! I simply deduced from your posts about those compiler issues that there might be some basics you're missing.

All I'm saying is without the fundamentals, it will be difficult if not impossible for you to understand what's going on!

Here are some links that can get you started:
javabeginner.com | Table of contents -- An excellent java fundamentals tutorial

Livelink - Redirection - you can get at many useful blackberry articles here

For reference, here is some code that will do what you're trying to do with a step by step explanation:

Code:
class FolderListenerMain extends UiApplication {
   
    private MainScreen  _mainScreen;
    private LabelField  _notifyField;
    
    public static void main( String[] args ) {
        
        // Create the UiApplication object and register it with the system
        // to start receiving UI events.
        FolderListenerMain app = new FolderListenerMain();
        app.enterEventDispatcher();
    }
    
    FolderListenerMain() {   
    
        // Create a new thread so the event dispatch thread doesn't block
        // when waitForDefaultSession() is invoked.
        Thread loadStoreThread = new Thread( new Runnable() {
            public void run() {
                
                // The mail store
                Store s = null;
                try {
                    
                    // Get the default mail session (if corporate this would be 
                    // a session associated with a BES mail servicebook record)
                    s = Session.waitForDefaultSession().getStore();
                    
                    if ( s != null ) {
                        
                        // Register the folder listener with the Store
                        s.addFolderListener( new FolderListener() {
                            
                            // Called when any message is added to the store
                            public void messagesAdded( FolderEvent e ) {
                                
                                Message m = e.getMessage();
                                if ( m != null && m.isInbound() ) {
                                    
                                    // Have to make sure this invoke later actually ends up on
                                    // our application's event queue. Simply calling UiApplication.getUiApplication
                                    // is not sufficient because the application we get back is not our own.
                                    FolderListenerMain.this.invokeLater( new Runnable() {
                                        public void run() {
                                            _notifyField.setText( "Message Received" );
                                        }
                                    });
                                }
                            }
                            
                            // Called when any message is removed from the store
                            public void messagesRemoved( FolderEvent e ) {
                                FolderListenerMain.this.invokeLater( new Runnable() {
                                    public void run() {
                                        _notifyField.setText( "Message Deleted" );
                                    }
                                });
                            }
                        });
                    }
                }
                catch ( Exception e ) {
                    ; // It would probably be good to catch the specific exception rather than a general one
                }
            }
        });
        
        _mainScreen = new MainScreen();
        _mainScreen.setTitle( "FolderListener Test" );
        _notifyField = new LabelField( "Waiting for message..." );
        _mainScreen.add( _notifyField );
        pushScreen( _mainScreen );
        
        loadStoreThread.start();
    }
}
I hope this helps! (Maybe I'm not that bad a guy? :P)

Last edited by CELITE : 07-23-2008 at 05:30 PM.
Offline  
Old 07-24-2008, 08:54 AM   #18 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2008
Model: 7100T
PIN: N/A
Carrier: Programmer
Posts: 50
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

well...i took a class in high school for basics for java, so i know enogh of basics of java
but JDE doesn't use the normal java, the basic classes or anything like that
and that's how i'm having more problems...


and the way you said it before wasn't very nice.
__________________
--------------------
Carlos Mastrangelo
--------------------
Offline  
Old 07-24-2008, 12:07 PM   #19 (permalink)
Thumbs Must Hurt
 
Join Date: Dec 2005
Model: 8310
Carrier: Rogers
Posts: 138
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

The blackberry development API includes the basic implementation of the CLDC classes plus RIM's API extensions.

In that sense it is very different from the Java SE framework that you're used to, but all the fundamental design patterns and development concepts still hold strong (with the exceptions of reflection and remote method invocation).

So for basic development, there's no difference in the fundamentals, which is the beauty of RIM's framework. In contrast, I find MIDP to be sluggish and limited, especially for UI development.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





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