Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package net.learn2develop.GoogleMaps; import java.io.Serializable; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.gsm.SmsMessage; import android.util.Log; import android.widget.Toast; public class SMSReceiver extends BroadcastReceiver implements Serializable { @Override public void onReceive(Context context, Intent intent) { if ("android.provider.Telephony.SMS_RECEIVED" .equals(intent.getAction())) { StringBuilder sb = new StringBuilder(); // 接收由SMS传过来的数据 Bundle bundle = intent.getExtras(); // 判断是否有数据 if (bundle != null) { // 通过pdus可以获得接收到的所有短信消息 Object[] objArray = (Object[]) bundle.get("pdus"); /* 构建短信对象array,并依据收到的对象长度来创建array的大小 */ SmsMessage[] messages = new SmsMessage[objArray.length]; for (int i = 0; i < objArray.length; i++) { messages[i] = SmsMessage .createFromPdu((byte[]) objArray[i]); } /* 将送来的短信合并自定义信息于StringBuilder当中 */ for (SmsMessage currentMessage : messages) { sb.append(currentMessage.getDisplayMessageBody()); } } Toast.makeText(context, sb.toString(), Toast.LENGTH_LONG).show(); Intent mainIntent = new Intent(context, MapsActivity.class); mainIntent.putExtra("location", sb.toString()); mainIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(mainIntent); } } }