SMS receiever I want answers and I want them NOW!

It's ridiculous!

BlackBerry rim give me a solution right now! I've had 15 hours straight so far and not luck is not cool.

using blackberry storm, and I simply want to receive text messages. I can send them using the following datagram code...

public void sendthisbull() {}
DatagramConnection connection = null;
try {}
String url = "sms://1510555560";
String messageAsString = "Hello World!";
ubyte bytes [] = messageAsString.getBytes ();
connection = Connector.open (DatagramConnection) (url);

Datagram in datagram = connection.newDatagram (bytes, bytes.length);

Connection.Send (datagram);
System.out.println ("I was sent");
}
{} catch (Throwable t)
System.out.println (t + "was a mistake").
}
{Finally
If (connection! = null) {}
try {}
Connection.Close;
}
catch (Exception e) {System.out.println (e + sending error"" ") ;}}
}
}
}

However when you use this beautiful "I swore, we wrote an article about her, but he just Plumb does not code."

_Dc = DatagramConnection
(DatagramConnection) Connector.Open("SMS://"); "
for (;
{
Datagram d = _dc.newDatagram (_dc.getMaximumLength ());
_DC. Receive (d);
ubyte bytes [] = d.getData ();
Address of string = d.getAddress ();
String msg = new String (bytes);
System.out.println ("received text SMS of" + address + ":" + msg);
}

nothing notta don't zip no not going not to pass dice get outta here!

It is the most frustrating, that I never treated and it's frustrating because text messaging

is a technology that we had during the last twelve years!

Now, if you please someone write a tutorial, make an existing application that will do 2 things.

Send and receive text messages.

I don't like who is doing... but the smsdemo does not work, does not speak a smsdemo is not it's smstrashbuggywe'renotdoneyet

That's what you call it.

Someone solve this confusion of cdma vs gms

If I understand well cdma can only receive datagrams multicast... thin k did it... and i ' ts does not

is there a specific port? just after this time $ 50,000 of Duke to the person who can post work

send/receive SMS code. Make the phone it's self of send a text message and post it!

I have more code... but it's not fair, I want answers now! NOW!

solve this problem and stop pretending to other positions is fixed... because it is not I can't receive anything!

Oh well, maybe it's good that I posted this, it will probably catch some attention users!

I have an important solution to this problem... and I'm the one who just posted like 10 minutes ago haha.

The following itself code will send a text message to show how send and receive text messages... He currently works on the Storm 9500! I don't know if it works on the Simulator and I don't really care either as the Simulator work also with things like the accelerometer etc. so for texting I test on the actual device. Here's the code...

import javax.wireless.messaging.*;
import java.io.*;
import java.util.*;
import javax.microedition.io.*;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.Display;
import javax.microedition.io.file.*;
import javax.microedition.io.DatagramConnection;
import javax.microedition.io.Datagram;

public class sms extends MIDlet implements MessageListener {

public sms(){}

public void notifyIncomingMessage(MessageConnection conn) {
//please note in my code I did use a messagelistener prior to datagram
//so I have no clue if using the messagelistener implementation
//had anything to do with helping this thing to listen for messages
//so i just left this here you can probably delete it though and not
//implement MessageListener...
//in which case it would be -->  public class sms extends MIDlet{
    //  Dispatch a single-pass message processor for each
    //  incoming message.
//  boolean _singlepass = true;
   // MessageProcessor mp = new //MessageProcessor(conn,_singlepass,newcanvas);
}

public void startApp(){
//in the startup I setup the listener and then sent the message using one
//method
ReceiveSms();
//notice at the end of ReceiveSms, it calls sendthisbull(); which
//sends the message...

}

public void sendthisbull(){
//i'm leaving this as the title of my function as that's how frustrating
//it was for this to actually work!
DatagramConnection connection = null;
        try {
                //the url notice it doesn't have a port number..
               //just saying cuz this might have something to do with it.
        String url = "sms://15108885462";
        String messageAsString = "Hello World!";
            byte[] bytes = messageAsString.getBytes();
            connection = (DatagramConnection) Connector.open( url );

            Datagram datagram = connection.newDatagram( bytes, bytes.length );

            connection.send( datagram );
        System.out.println("i was sent");
              //here i actually changed stuff to my canvas so I could
             //know the text was sent
        }
        catch (Throwable t) {
           System.out.println(t + "had an error");
        }
        finally {
            if(connection != null){
            try{
            connection.close();
            }
            catch(Exception e){System.out.println(e + "error sending");}
        }
        }
}
public void ReceiveSms(){
 _listener = new ListeningThread();
//_listener.setCanvas(newcanvas); if you guys wanted to add a canvas to //the listener you could do it using a method and pass it...
 _listener.start(); 

sendthisbull();
//send the text message...notice this is done after initializing the //listener

}
 private static class ListeningThread extends Thread {
    private boolean _stop = false;
    private DatagramConnection _dc;
    //private MyTextMessageCanvas mycanvas;
        //if you want you can give yourself a canvas to display
        //wheather or not the phone got the message...
//public void setCanvas(TextMessageCanvas thecanvas){
//mycanvas = thecanvas;
//}

    public synchronized void stop() {
    _stop = true;
        //here you can put in code to get rid of the connection
                //for when you exit the app();
            //maybe..
          // try{

            //  if( _dc != null){
             //   _dc.close();
              // }
             //}
          // catch(Exception e){System.out.println("error closing");}
    }
 public void run() {
try{
//listening on port 0 I was able to receieve text messages...
//however I will test without it and maybe that would also work..
DatagramConnection _dc = (DatagramConnection)Connector.open("sms://:0");
            for(;;)
        {
                //probably add in this stop code... taken from smsdemo
               //but I didn't use it when it worked so *shrugs*
        //if (_stop){
                  // return;
                 //}
               Datagram d = _dc.newDatagram(_dc.getMaximumLength());
               _dc.receive(d);
               byte[] bytes = d.getData();
               String address = d.getAddress();
               String msg = new String(bytes);
              // mycanvas.sayHi(msg + "he'd wrather have");
             //I made a canvas and changed a string and repainted()
            //so I could know when the text message was receieved...
         }
}
catch(Exception e){}

}

}

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for

  • Change ringing at night

    Hello. I wonder if there is a way to make your ringtone change after some time has passed, as midnight. Because of my work, I sometimes end calls, anywhere from midnight to early in the morning. My problem: I'm a heavy sleeper. I wonder if there is a

  • Can I install HD 2nd on Tecra A10?

    I would like to know if it would be possible to install 2 HD on Tecra A10 without losing the CD drive Bay? I know that this is possible on computers laptops 17 "and I noticed it's Qosmio F50 - 10Z 15" laptop has two hard drives. Thanks in advance.

  • How to make recovery disks?

    I have a HP Pavilion p7-1539 and you want to make recovery disks.  I need instructions step by step please. Since I had so much trouble with the latest model of Pavilion, I thought I got better go now before something happens to this computer.

  • Stop listening tcp and tcp read

    Hi all If I use tcp and tcp listening read blocks with a time of judgment-1, how to prevent their execution if they are waiting for incoming connection or data? The read block tcp is in a while loop and the State of the stop button is not evaluated,

  • Tasks and Notes using SE PC Companion