Contact retrieve and send sms problem
Note: i have change some funtion
Hi all
I started a thread of smsListening incoming when private number send sms I called the contact of recovery funtion.i am not able to send sms.
private class ListeningThread extends Thread { public void run() { try { iContact=new ContactUtility(); (iContact).Retieveallcontact(address); } catch (PIMException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
It is in a way I am recovery contact and send sms method...
void Retieveallcontact(String address) throws PIMException { Enumeration e=contactList.items(); _sender = new SendThread(); _sender.openmessage(address); _sender.start(); while(e.hasMoreElements()) { _sender.send(innerStream.toString()); } _sender.stop(); } private class SendThread extends Thread { private volatile boolean _start = false; String msg; private volatile boolean _stop=false; String Address; String address = "sms://"; MessageConnection smsconn = null; // Requests are queued. private synchronized void openmessage(String ddress) { Address=ddress; try { smsconn = (MessageConnection)Connector.open(address); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } _stop = false; } // Requests are queued. private synchronized void send(String message) { _start = true; msg=message; _stop = false; } // Shutdown the thread. private synchronized void stop() { if (smsconn != null) { try { smsconn.close(); } catch (IOException ioe) { System.out.println("Closing connection caught: "); ioe.printStackTrace(); } } _stop = true; } public void run() { for(;;) { if(_stop) { return; } if ( _start ) { TextMessage txtmessage = (TextMessage)smsconn.newMessage(MessageConnection.TEXT_MESSAGE , "//" + Address); txtmessage.setPayloadText(msg); try { smsconn.send(txtmessage); } catch (InterruptedIOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } _start=false; } } } }
Thank you
Hi bbdeveloper,.
I had solved the problem with the help of invokelater.thx for your answer anyway.
THX,
Ketan
Tags: BlackBerry Developers
Similar Questions
-
BlackBerry Z10 problem receiving and sending SMS
I'll have a problem, send and receive SMS messages. My carrier is Verizon. Maybe 1 out of 20 messages will make. When people called me and told me that they never got my messages, I tried to send me a few messages to check and none of them have been through. Does anyone know what would cause this and how to fix it? Thank you, Chris.
Found the problem. For anyone who feels the same:
Reach:
-Area phone call
-settings
-Smart dial
-country code: + 1
-Guide: your area code
-Link Nation No.: 10
-L' use 1 for nothing (off)
-Click on the reset bottom button
-
How to receive and send SMS in the emulator or Simulator?
Hello
I am newbie to blackberry. I want the code to send and receive SMS listener in the emulator or Simulator.
the research would have helped you a lot here.
http://supportforums.BlackBerry.com/T5/Java-development/use-SMS-to-notify-an-application/Ta-p/444965
in particular with regard to the Simulator:
http://supportforums.BlackBerry.com/T5/Java-development/simulate-phone-call-amp-message/m-p/138303?q... -
BlackBerry Q10 talk and send SMS
Can someone show me how to send response/texts, emails, etc. on a call with my Q10? I have always slip and put an end to call.
Thank you in advance.
It does not matter.
Skip this first step, just slide up the phone app and do not close, it just leave reduced and active.
-
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
performanceprivate 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 connectorinformation 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; MSCreate 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
-
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.
-
iPhone delete contacts one by one and sending messages to the wrong people
I have two problems with my contacts that become very cumbersome and no solution, that I could find online.
Problem 1: a few contacts per week disappear from all my devices, which are synchronized to the top through iCloud. Accordingly, my message thread is largely of numbers and I must discern who everyone is. It is even more difficult to start a new conversation. iCloud is the only place where I store contacts and return to a backup does not help because it will just remove contacts more next week, in addition to losing those that I added since the backup. Usually, it deletes the contact while I am SMS with them, so I saw the name change to a number several times.
Problem 2: Sometimes I have a person text and it will send the message to another person. It's very strange. I can even make this text a number rather than a name, and it will be text number of the other person. This usually happens between a couple husband and wife, or two people who work in the same place.
I use Messages to communicate a lot for work, and it's quite get in the way. It is quite complicated to get me out of the entire Apple ecosystem, which I'm deeply rooted in the, because it prevents me from communicating with people and to get anything done. Yet I can find no solution online and have not read even where Apple recognized the problem.
Please help and please tell me that the next series of OS updates will solve this problem.
It is certainly a strange phenomenon!
Have you tried to log in to your iCloud account, then back away from logging in?
Or perhaps reseting your device - restart your iPhone, iPad or iPod touch - Apple Support
-
After the OS and IOS updates SMS problems
I recently updated to IOS 9.3 and OS x 10.11.4. Since these updates, I had difficulties to send SMS. iMessages forward vigorously. But I often get errors failure-to-send three and four times in a row when trying to send an SMS message longer than one short sentence. NOTE: I'm announcing this issue in section OS X El Capitan, but this applies to generated no SMS messages only on my iMac, but also on my iPhone 6 and iPad Air2, with 9.3 updated IOS updated.
I have friends with non-Apple devices I have text frequently. Before the latest updates, my SMS messages would pass them quickly. Not now. I don't know how to make Apple aware of this situation. I sent a direct message to @AppleSupport on Twitter. Not sure how that will be effective.
Does anyone else have this problem?
Note to moderators: don't know where this question from the list. Please go to the Board. Thank you.
Hello
Make sure the iPhone is on the same network local (he will exploit Wifi)
Check the settings of text transfer.
If everything looks OK, but it does not reset the text Forwarding (turn it off for a few moments and then On Again to generate and new Code on the Mac).
22:00 Monday. March 28, 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).
a few iPhones and an iPad -
Recently, in Albania, I have an mobile number, and normally they have offers and their packages on calls and sms. the sticky thing is they also have the option to go short of the amount you paid. But that's only if you activate and I know that you can go out, even if it's a prepaid number, strange o my eyes and strange i just that apple can send sms to the United Kingdom without I know and this power use iPhone like at the beginning, but never seen anything like this. Mainly I mind because of confidence in the company and the product, not because it s a small amount of monye, but because I have no idea and I'm checking all my sms with this strange issue that i don't know who he is.
How ever I'd like to know can´t it possible to a iPhone can send sms without I know number that I have no idea as I have registered it in my cell phone. So what to do, before I report it to the authority and the Police because it seems like a fraud. And I don't want to pay for something I've ever used.
If your device sends an SMS to the United Kingdom, it seems that you are referring to the SMS activation for iMessage and FaceTime. It is a text Message hidden so check with the Apple server to the United Kingdom. If you are using media supported for the iPhone, they normally do not charge for these SMS, so I think that you are not using a supported carrier. If you have tried to enable iMessage and/or FaceTime, which is the cause. You should contact your operator to find out if they support iMessage and FaceTime. If this isn't the case, then you can not use these features.
-
Hotmail issue - a problem when deleting the Junk email and send to delete folder
I get a lot of those Nigerian e-mails 911 lately and they are in my junk e-mail folder. I never open these emails, 'Check all' delete mailboxes and sending them to the folder to delete.
In the past two weeks, what I noticed is that somewhere in transit between the junk in the suppression file folder, these suspicious emails end in the folder delete UNBOLDED; they are regular font type. Other ones I deleted at the same time, I know are not suspects, are characters fat as it should.
How an email that I didn't open end upwards in the folder to remove the? (as it is opened in transit to the folder to be deleted). It started only recently and I'm a little worried. It's as if it opens on the path to the folder to delete. I know it sounds crazy, but it's true.
Can someone tell me if my account could possibly be compromised in some way? Is it a problem that I should be concerned?
(I apologize if this is the wrong place for this post, but I had zero luck trying to ask a question on my hotmail account).
Thank you very much.
Hello
I'm sorry, but we cannot help with hotmail problems in these forums in response to vista
Please repost your question in hotmail in the hotmail link below forums
http://windowslivehelp.com/product.aspx?ProductID=1
ForumsConsult with Microsoft Certified Solutions____________________________________________For the different Forums for Windows Live Applications, select the link belowWelcome to Windows Live Solution Center -
I had problems opening and sending emails after January 2011 so I wanted to turn my back on Nov.2010
Hello
You cannot use the system back restore more than you have Restore Points. The only one
Another option would be to return the system to its out of the box, as it was when
you received. So, it would be better reset your e-mail settings and check with
the support of your email provider.How to create a System Restore Point in Windows 7
http://www.SevenForums.com/tutorials/697-system-restore-point-create.htmlHow to do a system restore in Windows 7
http://www.SevenForums.com/tutorials/700-system-restore.html============================================================
These can help with system related issues:
Follow these steps to remove corruption and missing/damaged file system repair or replacement.
Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup
Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN
sfc/scannow
How to fix the system files of Windows 7 with the System File Checker
http://www.SevenForums.com/tutorials/1538-SFC-SCANNOW-Command-System-File-Checker.htmlThen run checkdisk (chkdsk).
How to run check disk in Windows 7
http://www.SevenForums.com/tutorials/433-disk-check.html=============================================================
This is Hotmail:
Windows Live Solution Center - HotMail - HotMail Forums Solutions
http://windowslivehelp.com/Hotmail - Forums
http://windowslivehelp.com/forums.aspx?ProductID=1Hotmail - Solutions
http://windowslivehelp.com/solutions.aspx?ProductID=1How to contact Windows Live Hotmail Support
http://email.about.com/od/hotmailtips/Qt/et_hotmail_supp.htm-------------------------
And Windows Mail
Windows Live Mail - Forums
http://windowslivehelp.com/forums.aspx?ProductID=15Windows Live Solution Center - Solutions mail - Mail Forums
http://windowslivehelp.com/Windows Live Mail - mail Solutions
http://windowslivehelp.com/solutions.aspx?ProductID=15I hope this helps.
-
I had a company of pill hi jack my address book and send added all my contacts.
I had a company of pill hi jack my address book and send added all my contacts. I deleted my address book and I always get it to my email account. How can I stop them? I have to close the account? and if I can I re open it with the same name?
Hello
If you are using windows mail, windows live mail or outlook for malware scan
Download update and scan with the free version of malwarebytes anti-malware
http://www.Malwarebytes.org/MBAM.php
You can also download and run rkill to stop the process of problem before you download and scan with malwarebytes
http://www.bleepingcomputer.com/download/anti-virus/rkill
If it does not remove the problem and or work correctly in normal mode do work above in safe mode with networking
Windows Vista
Using the F8 method:
- Restart your computer.
- When the computer starts, you will see your computer hardware are listed. When you see this information begins to tap theF8 key repeatedly until you are presented with theBoot Options Advanced Windows Vista.
- Select the Safe Mode with networking with the arrow keys.
- Then press enter on your keyboard to start mode without failure of Vista.
- To start Windows, you'll be a typical logon screen. Connect to your computer and Vista goes into safe mode.
- Do whatever tasks you need and when you are done, reboot to return to normal mode.
If you use Hotmail
Please repost your question in hotmail in the hotmail link below forums
-
original title: sending Emails
When you send an Email to someone not in my contact list "Check names" appears and says not in the contacts list, and are not sent.
Remember - this is a public forum so never post private information such as numbers of mail or telephone!
Ideas:
- You have problems with programs
- Error messages
- Recent changes to your computer
- What you have already tried to solve the problem
If you use a POP3 Protocol account, please post on the forum network, e-mail and put online:
http://social.answers.Microsoft.com/forums/en-us/vistanetworking/threads
If you use Hotmail, please report it to Windows Live Solution Center, son of Hotmail:
http://www.windowslivehelp.com/forums.aspx?ProductID=1 . for the benefits of others looking for answers, please mark as answer suggestion if it solves your problem. -
Problem with sending SMS programmatically to multiple recipients:
Hello world
I try to send information by SMS to multiple recipients at the same time programmatically. When I am trying to send SMS messages to a recipient, it works fine. I am able to send the data to a recipient successfully without any problems. But when I try to send to multiple recipients (more than one) in the code below loop 'for', it does not send to all recipients. That is to say, sometimes he sent the data to the only recipient if there are two numbers of beneficiaries (or) sometimes is not even send SMS to anyone (or the) sometimes sent to all recipients. Like that it is not consistent way when trying to send to multiple recipients at the same time.
I even tried to use 'invokeAndWait' before calling the SMSThread code, but still the same problems.
Could someone guide how I can resolve to send content to multiple users at the same time?
public void SendMultipleSMS() { // multiple recipients stored here _data = (Vector) store.getContents(); long totalSize = _data.size(); // totalSize - recipients count boolean yesLastSMS = false; // totalSize - recipients count if ( totalSize>0 ) { _payload = null; _payload = contactsDetToSend(); // Content to send for ( int i=0; i
I fixed it by moving beneficiaries 'for' code for the loop inside the SMSThread itself and sending to multile numbers at a time.
-
Me and my dad is from the same Apple ID and I want to set up his own, but how it will get all his contacts, photos etc from my Apple ID? Or he will lose all? or I could keep them saved for him and send more via an application any? I don't know how to resolve this issue, if someone could point me in the right direction.
Have him create a id Apple here- create and start using a Apple - Apple Support ID, and then both you can create an album-photo sharing Photo Sharing - Apple Support iCloud
Maybe you are looking for
-
How can I maintain my Macbook Pro?
Hello I've been a Mac user for years, but I'm forced to use my windows wow. (not). because of my Macbook Pro running very slow. with my Mac Mini, btw, my name is Jack.I can't upgrade to newer models,because of my troubles to unemployment.So what is t
-
Vista Bluescreen BCCode 116, pls help!
Signature of the problem: Problem event name: BlueScreen OS version: 6.0.6002.2.2.0.256.6 Locale ID: 1033 More information about the problem: BCCode: 116 BCP1:
-
HP pavilion 15 laptop 15-e017tx
How to find my product key?
-
Open the browser of blackberry on click of a button?
Hello I want to open the BlackBerry browser programmatically... say for example on the Click event of the button? How can I do this? Also guide me if associated with the useful material is available Thank you.
-
Non-transactional Database query in OSB 12 c
HelloI "ve a scenario like this:"Success: DBAdapter > > OSBProxy > > PublishToJMSQ and status-> PError: DBAdapter > > OSBProxy > > OSBBusinessService (@Service Error Handler) > > DBAdatper and status-> E Strategy of the poll: logic of deleteColumn na