When sending sms, some no-contact. SMS and some no-contact. not get?

Hi all

I developed the sms application, when I send the SMS from this application, some no-contact. to sms but some no-contact. do not get.

can someone help me?

concerning

Savi

Hi all

I solved this problem. now I can send message to anyone of this sms application.

If anyone need this app, I'm writing this request here... This works perfectly...

package sms.savi;

Net.rim.device.api.ui import. *;
Net.rim.device.api.ui.component import. *;
Net.rim.device.api.ui.container import. *;
Javax.microedition.io import. *;
Import Java.util;
import java. IO;
Javax.wireless.messaging import. *;

class SmsDemo extends UiApplication {}

Constants
// ----------------------------------------------------------------
private static final int MAX_PHONE_NUMBER_LENGTH = 32;

Members
// ------------------------------------------------------------------
Private EditField _sendText.
Private EditField _address; A phone number for outgoing SMS messages.
Private _status EditField.
Private ListeningThread _listener;
private SendThread _sender.
private StringBuffer _statusMsgs = new StringBuffer(); Caching for
improved
performance

private MessageConnection _mc;
Private boolean _stop = false;

_sendMenuItem private MenuItem = new MenuItem ("send", 100, 10) {}
public void run() {}
String text = _sendText.getText ();
String addr = _address.getText ();

If (text.length > 0 () & addr.length () > 0) {}
Send (addr, text);

}
}
};

Static
// ------------------------------------------------------------------
private static String _openString = "sms: / /"; See connector

information on the implementation.

Public Shared Sub main (String [] args) {}
Create a new instance of the application and the beginning
the application on the thread of the event.
SmsDemo sms = new SmsDemo();
sms.enterEventDispatcher ();
}

Inner classes
// ------------------------------------------------------------
private class ListeningThread extends Thread {}
synchronized Private Sub {} stop()
_stop = true;

try {}
If (_mc! = null) {}
Close the connection so that the thread will return.
_mc. Close();
}
} catch (IOException e) {}
System.Err.println (try ());
}
}

public void run() {}
try {}
_mc = Connector.open (_openString) (MessageConnection); Closed
by
the
Stop()
method.

for (; {
If {(_stop)
return;
}

Message m = _mc.receive ();
receivedSmsMessage (m);
}
} catch (IOException e) {}
Probably the stream has been closed.
System.Err.println (try ());
}
}
}

/**
* A simple abstraction of an sms message, used by the SendThread class.
*/
private static final class SmsMessage {}
private String _address;
private String _msg;

private SmsMessage (String address, String msg) {}
_address = address;
_msg = msg;
}

Private Message toMessage (mc MessageConnection) {}
TextMessage m = (mc.newMessage) (text)
MessageConnection.TEXT_MESSAGE, ' / / ' + _address
+ "");
m.setPayloadText (_msg);

return m;
}
}

/**
* A thread to handle outbound transactions.
*/
private class SendThread extends Thread {}
private static final int TIMEOUT = 500; MS

Create a vector of objects SmsMessage with an initial capacity of 10.
For this implementation, it is unlikely that more than 10 messages
queued at a time given.
private vector _msgs = new Vector (10);

volatile Boolean _start private = false;

The applications are pending.
private synchronized {void send (address of the string, String msg)
_start = true;
_msgs. AddElement (new SmsMessage (address, msg));
}

Termination of the thread.
synchronized Private Sub {} stop()
_stop = true;

try {}
If (_mc! = null) {}
_mc. Close();
}
} catch (IOException e) {}
System.Err.println (e);
updateStatus (try ());
}
}

public void run() {}

for (; {
Adjustment of the wire.
While (! _start &! _stop) {}
Sleep for a bit so we don't spin.
try {}
Sleep (timeout);
} catch (InterruptedException e) {}
System.Err.println (try ());
}
}

Exit condition.
If {(_stop)
return;
}

While (true) {}
try {}
SmsMessage sms = null;

synchronized (THIS) {}
If (! _msgs.isEmpty ()) {}
SMS = _msgs.firstElement () (SmsMessage);

Delete the item so that we don't send it again.
_msgs. RemoveElement (SMS);
} else {}
_start = false;
break;
}
}

_mc. Send (SMS.toMessage (_mc));
_mc. Close();
System.Exit (0);

} catch (IOException e) {}
System.Err.println (e);
updateStatus (try ());
}
}
}
}
}

private class SmsDemoScreen extends form {}

Constructor
private SmsDemoScreen() {}
Dim str As String = "8971833590";
String = msgStr "How are you?"
setTitle (new LabelField ("Demo SMS", LabelField.USE_ALL_WIDTH));

_address = new EditField ("to:", "", MAX_PHONE_NUMBER_LENGTH,)
EditField.FILTER_PHONE);
Add (_address);
Add (new SeparatorField());
_sendText = new EditField ("Message:", "");
Add (_sendText);

/*
* _status = new EditField(); Add (_Status);
*/

addMenuItem (_sendMenuItem);
}

/**
Prevent save them dialog box is displayed.
*
* @see net.rim.device.api.ui.container.MainScreen #onSavePrompt)
*/
public boolean onSavePrompt() {}
Returns true;
}

/**
* Close the application
*
* @see net.rim.device.api.ui.Screen #close)
*/
{} public void close()
_listener. Stop();
_sender. Stop();
Super.Close ();
}
}

Constructor
private SmsDemo() {}
_listener = new ListeningThread();
_listener. Start();

_sender = new SendThread();
_sender. Start();

Screen SmsDemoScreen = new SmsDemoScreen();
pushScreen (screen);
}

/**
* Update the GUI with the data just got.
*/
{} private void updateStatus (final String msg)
invokeLater (new Runnable() {}
public void run() {}
Delete the string buffer.
_statusMsgs.Delete (0, _statusMsgs.length ());
_statusMsgs.Append (_Status.GetText ());
_statusMsgs.Append ('\n');
_statusMsgs.Append (MSG);
_Status.SetText (_statusMsgs.ToString ());
}
});

}

/**
* A simple formatting of received sms message.
*/
Private Sub receivedSmsMessage (Message m) {}
String msg_app = m.getAddress ();
Address of string = m.getAddress ();
String msg = null;

If (m instanceof TextMessage) {}
TextMessage tm = m (text);
MSG = tm.getPayloadText ();
}

StringBuffer sb = new StringBuffer();
SB. Append("Received:");
SB. Append ('\n');
SB. Append("destination:");
SB. Append (Address);
SB. Append ('\n');
SB. Append("Data:");
SB. Append (MSG);
SB. Append ('\n');

updateStatus (sb.toString ());
}

private send Sub (String addr, String data) {}
_sender. Send (addr, data);
}
}

Of

Savi

Tags: BlackBerry Developers

Similar Questions

  • My iphone 6 is possessed!  He opens my apps, send SMS and call my contacts, my games.  Frustrated!

    My iphone 6 is possessed!  He opens my apps, send SMS and call my contacts, my games.  Frustrated!

    Basics of the manual are restarting, reset, restore.

    Start there.

  • Desktop SMS and Windows Mail are not working together

    Hello

    thought I'd post here here as having a few issues with my Windows Mail but my desktop computer suffers the same problems and on a Vista forum where I posted my problem a few very useful told me who to try to solve the problems.

    One of them suddenly realized I had said my laptop is a Toshiba, and apparently the Desktop SMS and Windows Mail are not working together so that the person suggested unless I use it to uninstall apparently amongst the technically trained its known that these two programs do not like each other and explain why my office is not the problem but the laptop don't.

    After you have reset the Touch of Windows Mail (tutorial on a site http://www.vistax64.com/tutorials/ vista) wood don't be put off by vistax64 as site 32 and 64 and followed great reset Windows Mail from Brink (do not restore all mail) then uninstalled Desktop SMS and touch of the drink no more mail questions that gave me problems almost every day with marking than reading/sending project messages.

    So had to click forward then remove those bits and complete the email to send and touch wood since doing these two things as soon as send an email to the box shipment or project to obtain the number of emails in parentheses, whereas before it wouldn't happen unless I closed the program and then reopened.

    Hoping that these solutions have solved my problem and wanted to share it with someone else who wants to read this thread and you recommend Vista 64 because they are all very useful there and speak in non-technical terms for those of us not technically trained.

    Debbie

    Thanks for this piece of information. Should be useful for some of us.

  • I download the latest version of Firefox, but when I go to sign up for google + it tells me that my browser is no longer supported. I tried uninstalling and everything, but can not get the new version appears. Any Suggestions?

    I download the latest version of Firefox, but when I go to sign up for google + it tells me that my browser is no longer supported. I tried uninstalling and everything, but can not get the new version appears. Any Suggestions?

    Please see that.

  • When I try to put in operation and open Windows Defender I get one of the following errors: 0x800705b4, 0x800106ba, 0x800710dd.

    Cannot open Windows Defender

    When I try to put in operation and open Windows Defender I get one of the following errors: 0x800705b4, 0x800106ba, 0x800710dd.  What is the solution?

    When I try to put in operation and open Windows Defender I get one of the following errors: 0x800705b4, 0x800106ba, 0x800710dd.  What is the solution?

    You have the MSE, Microsoft Security Essentials, AVG, Norton or McAfee installed?
    If so, these programs are supposed to close Windows Defender.
    This is because they have their own advocates. 2 defenders running on the same computer is redundanr as well as to create conflicts.
    In short, if you have one of the above, you don't need Windows Defender.

    Is there another reason you want to open Windows Defender?

    P.S. Wrong forum for your question. He should go to the security forum.

  • When I used to press the fill and sign that I'd get a drop down add initials, place check, create a signature now when I click on fill and sign all the I can do is to fill in information and create a signature digital-how can I pick up my old options? Tha

    When I used to press the fill and sign that I'd get a drop down add initials, place check, create a signature now when I click on fill and sign all the I can do is to fill in information and create a signature digital-how can I pick up my old options? Thank you

    It seems that you have empty fields of Digital Signature in the form.  Acrobat Reader DC complete and sign will add a signature of annotation with a PDF file that has Acrobat form fields or fields of Digital Signature in it.  Test it by opening a PDF file that has no form fields or fields of Digital Signature in it and who is not protected by security permissions.

  • I can work between my Mac and iPad, but can not get my iphone to receive transfers?

    I can work on spreadsheets Numbers between my Mac and iPad, but can not get my iphone to receive transfers?  The numbers icon at bottom left of the screen, but none of my worksheets appear on my iPhone.

    Did you numbers is synchronization correctly via iCloud on your iPhone?  You could check that the connection of numbers to iCloud is turned on at two places:

    Settings > iCloud > iCloud Drive > numbers

    and,

    Settings > numbers > use iCloud

    SG

  • Webcam is displayed in devices and printers, but can not get turned on?

    Original title: webcam 270
    Webcam is displayed in devices and printers, but can not get turned on?

    Hello

    ·         What operating system do you use?

    ·         You're using a built-in or external webcam?

    ·         What is the brand and model of the webcam?

    ·         Were there recent changes made on the computer before the show?

    Method 1:

    I suggest you to check in Device Manager if you can detect the webcam. See the link below to open the Device Manager in windows 7:

    http://Windows.Microsoft.com/en-us/Windows7/open-Device-Manager

     

    Method 2:

    Try to update the drivers for the webcam from the manufacturing site and check if it works:

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    Method 3:

    Use the hardware and devices Troubleshooter to fix the problem.

    Open the hardware and devices Troubleshooter

    http://Windows.Microsoft.com/en-us/Windows7/open-the-hardware-and-devices-Troubleshooter

     

    Method 4:

    I also suggest that you run the Microsoft fixit tool and check if that helps:

    Hardware devices do not work or are not detected in Windows

    http://support.Microsoft.com/mats/hardware_device_problems/en-us

  • Set a time to send SMS and iMessage

    Is there a way to set a time when an SMS or an iMessage must be sent, for example type the message in the middle of the night and set a time to send it in the morning.

    Hello

    Not with the current parameters in the Messages.

    You might be able to write an AppleScript or Automator item to do this, but both are out of my fixed skills.

    20:13 Friday; September 9, 2016

     iMac 2.5 Ghz i5 2011 (El Capitan)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro (Snow Leopard 10.6.8) 2 GB
     Mac OS X (10.6.8).
     iPhone and iPad (2)

  • Get the error when sending sms. [I think it's a simple fix. but I'm a newbie]

    package com.iphone4life4;
    
    import net.rim.device.api.system.*;
    import javax.microedition.io.*;
    import java.io.*;
    public class App extends Application
    {
         private String addr = "15198887465";
         private String msg = "This is a test message.";
         private DatagramConnection _dc = null;
         private static String _openString = "sms://";
         public static void main(String[] args)
         {
              new App().enterEventDispatcher();
         }
         public App()
         {
              try {
                   _dc = (DatagramConnection)Connector.open(_openString);
                   msg.getBytes();
                   Datagram d = _dc.newDatagram(_dc.getMaximumLength());
                   d.setAddress("//" + addr);
                   _dc.send(d);
              } catch ( IOException e) {}
              System.exit(0);
         }
    }
    

    This is my code and the error I get is the following:

    Thread [SMS2D(319)id=191674368] (Suspended (exception ClassCastException))
        Protocol.makeMessage(DatagramBase) line: 974
        Transport.send(Datagram, DatagramAddressBase, IOProperties, DatagramStatusListener, int) line: 445
        Transport(DatagramTransportBase).superSend(Datagram) line: 299
        Protocol(DatagramConnectionBase).send(Datagram) line: 320
        Protocol.send(Datagram) line: 418
        App.() line: 23
        App.main(String[]) line: 14
    

    Who is wrong?

    Try like this

    new Thread()
    {
       public void run()
       {
          try
          {
             _dc = (DatagramConnection)Connector.open(_openString + addr);
            // msg.getBytes();
             Datagram d = _dc.newDatagram(_dc.getMaximumLength());
          //   d.setAddress("//" + addr);
             d.setData(msg.getBytes(),0,msg.getBytes().length());
             _dc.send(d);
          }
          catch ( IOException e)
          {
          }
       }
    }.start();
    

    To work or not

    Hit as if you got your answer

  • Sounds of bells, the sms and the app does not have Moto G

    Hello

    I have a Moto G and for some reason any ringtone, do not work the sounds of sms and app notifications. There is nothing wrong with the speakers on the phone that I can still play music and my alarm still wake up in the morning. When I go to settings, sounds and notifications and move the slider for each audio section, I can hear an audio preview for the media and the alarm volume but won't ring volume. If anyone can help me with this I would be immensely grateful that I rely on my phone for work.

    Thank you in advance,

    Luke

    For anyone who has had a similar problem. I did a factory reset on my phone and this has solved the problem. Bit of a burden, but at least the phone works now...

    Luke

  • BlackBerry Z10 phone duplicate numbers in contacts when send SMS or call

    Not quite the same as the bug photos, but when you select a contact in the text of the Hub, the numbers are all duplicated.

    However in the contacts application, if they are not.

    Hello AndroidTwister,

    When you write a message, it looks at all of your list of contacts for example Facebook, Twitter, Email, Sim phone book, so if the number is associated with more contact then a list your can see several instances of the number.

    Thank you.

  • Problems with sending sms and calls blackBerry Smartphones

    Hello

    I recently me a:

    BLACKBERRY 9300

    Smartphone (3G, WiFi)

    V5.0.0.977 (platform 6.3.0.63)

    Band 3G 1,2,5,6

    v3.8.5.85 cryptographic kernel

    version 1.0.91.633t of brand

    Configuration of micro Edition: CLD - 1.1

    Micro Edition profile: MID - 2.1

    Micro Edition JTWI version: 1.0

    Micro Edition Media version: 1.1

    Micro Edition PIM version: 1.0

    Micro Edition File version: 1.0

    Micro Edition bluetooth version: 1.1

    Micro Edition location version 1.0.1

    Micro edition security and trust services (APDU) version: 1.0

    WLAN version 4.1.1.30

    and I seem to have a unique problem.

    I'm on giffgaff (who has the phone accepts very well), but...

    1. I can only call a few people in my contact list. (at every time without problem) where others it disconnects right away when I try to call.

    2. I cannot sms only to individuals who have already sent me an sms, I can carry on a conversation but does not start with someone.

    3. some people I can txt I can't call and visa versa.

    I tried to make calls and txts in different places and times with the full signal strength. As I tried all the proposed problem fixed here. Yet, I still have the problem. I don't know if people have hurt to put a hand on me.

    any help with this would be much appreciated.

    sincere greetings

    Thanks for your detailed description, which helps us a lot. I recommend that you download blackberry protect and do a full backup. After the backup, please try reloading your software through blackberry desktop software or wipe a complete security. NOTE: all data will be lost during a wipe.

  • BlackBerry Smartphones capable of sending sms and mms picture BUT cannot receive MMS pictures.

    I am writing to my sister. She has a BB 8330... updated with the latest version of the software. Suddenly, we noticed that it is unable to recover photos by mms (she had previously). In fact, she is unable to retrieve an mms with only text. The message she received trying to extract an image is "could not retrieve the content of the message. Try again later. "It is spoken with support and they are confused and say they will come back to him. She is able to "send" mms text and mms to all images. And, of course, she has no problem with sms text messages. She tried "battery pull" several times. She is released all memory. It has a 8 GB memory (mass storage mode) with 6 GB free. His unit has 'Free file' 47732496 bytes. The only thing she has installed is "documents to go premium. A reflection on this subject or advice? Thank you!

    Tanzim thank you very much for your quick response.  No, phones who sent mms messages are an another BB 8330 and a Motorola razer.

    She contacted the 'Documents to go' people and they responded that she needed to download an older version and then she would be able to receive mms messages.  They have not themselves give instructions or links!  So, we wonder if she would like to download an older version... She would still have the premium version, she paid for.  I'll learn more and let you know.  The 'documents to go' people must have encountered this problem before.  Too bad, they don't tell people before they download it!

    Too, I have a BB 8330 Curve and love it.  My husband tells people that I have it in my face all the time!  Laughing out loud

    Adicted?  no [smiling shyly]

  • Firefox crashed, I reinstalled and now when I use a new tab for an address I can not get it to load by clicking on enter. How to activate it?

    When I start typing in the address of my story captures the correct address, but the only way that I get to load is hitting the arrow button in the address bar. I want to be able to hit enter

    Hey Susan-MPC.

    Have you tried to start Firefox in Mode safe? Key 'shift' startup of Firefox. It could be related to an extension. Then you should read the extensions, themes and problems of hardware acceleration to resolve common troubleshooting Firefox problems.

    I see you are using an older version of Firefox as well. You can update. There are many advantages to the performance of the latest version of the browser.

    Hope this helps!

Maybe you are looking for

  • Please remove two Skype accounts.

    Could not delete the two accounts for me? I no longer use my friends constantly contacting them and thought I always use these accounts. These accounts are "[deleted by Moderator]' and '[deleted by Moderator]' I thank you.

  • HP G72: How to disable the Admin password and turn on Pasword

    Hi, I have a HP G72 laptop, while playing in the BIOS, I put the Admin password and turn on the password. I do not know the password but it would disable instead so I don't have to enter it every time I turn it on. I entered the wrong code 3 volumes

  • T540p - wireless issues

    I don't have the machine to my site, so the info I have is part of me Teamview'in the machine and the response I got from the user on the phone. One of our T540p machines are having wireless connection problems. He connected after a fresh reboot (mos

  • Script output

    Hello. Im making an app BB10 WebWorks and in the past I've been able to use the blackberry.app.event.onExit() commands to exit the application. But they don't work anymore? or am I wrong? This is my config:

  • How can I move a sticky notes. When I choose the move option nothing happens

    I would like to publish sticky notes but they stack above the other.  When I try to move them, I get the icon white arrow with four points, but nothing happens?