Hello How are you I have tried to send the sms with unicode character to the android phone itself and accept the message by my application (using BroadcastReceiver ...) to view its content. but still the unicode character is displayed as space. And I tried to see its code using codePointAt( ) and it displays number 32.
What do you suggest? Should I change the encoding for my code, JVM, ...? How can I change the encoding of my program? I am developing my application by Eclipse and Android ADT. Thank you for response. and also I waiting your response Andu On Jan 1, 1:49 am, Frank Weiss <fewe...@gmail.com> wrote: > The code looks good AFAICT. > > Please give the actual before/after characters that are coming out wrong. > For example, try the Ethiopian syllable qu, U+1241. If it's coming across as > a box followed by an "A", then the receiver has gotten two characters, > U+0012 and U+0041. I really need to see the hexadecimal data in your sent > and received SMS messages to figure out what's going wrong. > > I would also suggest that using the debugger or android.util.Log, instead of > Toast, would be a better way to debug. > > On Thu, Dec 31, 2009 at 2:26 AM, andu <alemf...@yahoo.com> wrote: > > To send the message I have used the following function: > > > public boolean sendSMSMessage(String compiledContent, String > > DistinationAddress) > > { > > String receiverPhoneNumber = DistinationAddress; > > String messageCenterPhoneNumber = ""; > > SmsManager smsMgr = SmsManager.getDefault(); > > smsMgr.sendTextMessage(receiverPhoneNumber, null, > > compiledContent, > > null, null); > > return isSent; > > } > > > To receive the message I have used the following function: > > > @Override > > public void onReceive(Context context, Intent intent) { > > Bundle bundle = intent.getExtras(); > > > if(bundle != null) > > { > > Object messages[] = (Object[]) bundle.get("pdus"); > > SmsMessage smsMessage[] = new SmsMessage[messages.length]; > > for (int n = 0; n < messages.length; n++) > > { > > smsMessage[n] = SmsMessage.createFromPdu((byte[]) > > messages > > [n]); > > } > > > // show first message > > Toast toast = Toast.makeText(context, " Brhp Received SMS: " > > + smsMessage[0].getMessageBody()+ "from " + smsMessage > > [0].getOriginatingAddress(), Toast.LENGTH_LONG); > > toast.show(); > > > String messageBody = smsMessage[0].getMessageBody(); > > String messageSource = > > smsMessage[0].getOriginatingAddress(); > > } > > > } > > > On Dec 29, 1:02 am, andu <alemf...@yahoo.com> wrote: > > > How are you all? > > > > I am developing application for android phone. Currently I am testing > > > my system in the emulator. In my application, I want to send unicode > > > character (Amharic language character) via SMS to the other emulator > > > instance. But in the receiver side, the message is not viewed > > > properly. I think the problem is some character encoding related > > > problem. > > > > In addition similar problem happens for texts which are queried for > > > the sqlite database. that is when I send a query result via SMS the > > > same problem occurs. Please help me. > > > > Sorry for posting the same message again. Please help me. > > > > Thank you > > > > Andu. > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en