publicstaticSmsMessagecreateFromPdu(byte[]pdu){SmsMessagemessage=null;// cdma(3gpp2) vs gsm(3gpp) format info was not given,// guess from active voice phone typeintactivePhone=TelephonyManager.getDefault().getCurrentPhoneType();Stringformat=(PHONE_TYPE_CDMA==activePhone)?SmsConstants.FORMAT_3GPP2:SmsConstants.FORMAT_3GPP;message=createFromPdu(pdu,format);if(null==message||null==message.mWrappedSmsMessage){// decoding pdu failed based on activePhone type, must be other formatformat=(PHONE_TYPE_CDMA==activePhone)?SmsConstants.FORMAT_3GPP:SmsConstants.FORMAT_3GPP2;message=createFromPdu(pdu,format);}returnmessage;}