Я делаю SMS-приложение, которое просто выполняет отправку и получение SMS ... все в порядке, но когда я отправляю smilays или emojis, он отображает код emojis, а не emois, я использовал edittext для отправки смс и textview для получения sms, я также изменил тип ввода в longmessage, но все еще имею ту же проблему ... Я хочу показать правильные smilays, когда кто-нибудь отправит меня и когда я отправлю кого-нибудь .... мой английский не очень хороший PLZ Dont mindкак мы показываем smilays при получении sms в android
, например, я хочу послать счастливую улыбку к моему другу, когда я выбрать по умолчанию андроида его смайлики показать мне код, как смайлики :) :(: P не показать мне смайлики
private void SendSms() {
// TODO Auto-generated method stub
mPhoneNumber = FriendData.getNumber();
mMessage=messagetosend.getText().toString();
SmsManager smManager=SmsManager.getDefault();
ArrayList<String> parts = smManager.divideMessage(mMessage);
smManager.sendMultipartTextMessage(mPhoneNumber, null, parts, null, null);
//String userInput = messagetosend.getText().toString();
try
{
ContentValues values = new ContentValues();
values.put("address", mPhoneNumber);
values.put("body", mMessage);
values.put("date", DateFormat.getDateTimeInstance().format(new Date()));
getContentResolver().insert(Uri.parse("content://sms/sent"), values);
Calendar c = Calendar.getInstance();
SenderMessages(mMessage, c.getTimeInMillis());
messagetosend.setText("");
Toast.makeText(getApplicationContext(), " Message Sent", Toast.LENGTH_LONG).show();
// finish();
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
@Override
public void onReceive(Context contx, Intent intent) {
String body = "";
String number = "";
Bundle bundle = intent.getExtras();
SmsMessage[] msgs = null;
if (bundle != null)
{
// ---retrieve the SMS message received---
Object[] pdus = (Object[]) bundle.get("pdus");
msgs = new SmsMessage[pdus.length];
for (int i = 0; i < msgs.length; i++)
{
msgs[i] = SmsMessage.createFromPdu((byte[]) pdus[i]);
body += msgs[i].getMessageBody().toString();
number +=msgs[i].getOriginatingAddress();
}
}
try
{
Toast.makeText(contx, number, Toast.LENGTH_LONG).show();
Toast.makeText(contx, body, Toast.LENGTH_LONG).show();
}
catch(Exception e)
{
Toast.makeText(contx, number, Toast.LENGTH_LONG).show();
Toast.makeText(contx, body, Toast.LENGTH_LONG).show();
}
}
общественный недействительный ReciverMessages (строка сообщение, долгое время) {
LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.receiver_activity, null);
mContainerView.addView(view);
TextView texttime = (TextView) view.findViewById(R.id.time_date_receiver);
TextView textmessage = (TextView) view.findViewById(R.id.tvreceiver);
//DateFormat format = new DateFormat();
SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");
String MSGDate = df.format(time);
if(MSGDate.equalsIgnoreCase(Utils.GetCurrentDate()))
{
SimpleDateFormat df1 = new SimpleDateFormat("HH:mm");
String MSGDate1 = df1.format(time);
texttime.setText(MSGDate1);
}else
{
texttime.setText(MSGDate);
}
textmessage.setText(message);
}
Пожалуйста, введите свой код здесь –