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 <[email protected]> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to