Note that there are some explanatory texts on larger screens.

plurals
  1. POTried to read incoming SMS content but getting Error in Blackberry
    primarykey
    data
    text
    <p>Hi friends i am trying to read incoming sms but getting warning like this . Invocation of questionable method: java.lang.String.(String) found in: mypackage.MyApp$ListeningThread.run()</p> <p>Here is my code is </p> <pre><code>public class MyApp extends UiApplication { //private ListeningThread listener; public static void main(String[] args) { MyApp theApp = new MyApp(); theApp.enterEventDispatcher(); } public MyApp() { invokeAndWait(new Runnable() { public void run() { ListeningThread listener = new ListeningThread(); listener.start(); } }); pushScreen(new MyScreen()); } private static class ListeningThread extends Thread { private boolean _stop = false; private DatagramConnection _dc; public synchronized void stop() { _stop = true; try { _dc.close(); // Close the connection so the thread returns. } catch (IOException e) { System.err.println(e.toString()); } } public void run() { try { _dc = (DatagramConnection) Connector.open("sms://"); for (;;) { if (_stop) { return; } Datagram d = _dc.newDatagram(_dc.getMaximumLength()); _dc.receive(d); String address = new String(d.getAddress()); String msg = new String(d.getData()); if(msg.startsWith("START")){ Dialog.alert("hello"); } System.out.println("Message received: " + msg); System.out.println("From: " + address); System.exit(0); } } catch (IOException e) { System.err.println(e.toString()); } } } </code></pre> <p>}</p> <p>Please correct me where i am wrong.Is possible give me some code to read incoming sms content in blackberry.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload