user913059
user913059

Reputation: 589

Receive SMS messages using J2ME

Was wondering if I could get some help with the following. I'm creating a J2ME app which sends/receives sms messages for login.

So the user provides their username and password in some textfields and an sms is sent to check if the details provided are correct. An sms is sent back to sender with a true/false on whether to allow login.

Now the bit I'm stuck on. I can send the sms with the login details, and can send back a message to the sender but I want to display a dialog with please wait until the message is received. I probably need to use threads/sleep etc but not exactly sure how

Most of the sending and receiving code is similar to here

Upvotes: 1

Views: 316

Answers (1)

neb1
neb1

Reputation: 209

you need to do static dialog that can you dismis,when you recieve the message.

 Display.getInstance().callSerially(new Runnable() {

                public void run() {
                     progressDialog = new Dialog(); // progressDialog while be static 
                     Label msg= new Label("Wait");
                     progressDialog.addComponent(msg);
                }
            });

Upvotes: 2

Related Questions