當前位置:名人名言大全網 - 短信平臺 - 安卓手機怎麽接收SMS信息?

安卓手機怎麽接收SMS信息?

Java核心代碼:

public String getSmsInPhone()

{

final String SMS_URI_ALL = "content://sms/";

final String SMS_URI_INBOX = "content://sms/inbox";

final String SMS_URI_SEND = "content://sms/sent";

final String SMS_URI_DRAFT = "content://sms/draft";

StringBuilder smsBuilder = new StringBuilder();

try{

ContentResolver cr = getContentResolver();

String[] projection = new String[]{"_id", "address", "person",