欢迎来到天天文库
浏览记录
ID:48213286
大小:253.00 KB
页数:126页
时间:2020-01-22
《计算机软件著作权登记_源代码范本.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、......packagecom.example.shuoya;importjava.util.Set;importandroid.content.BroadcastReceiver;importandroid.content.Context;importandroid.content.Intent;importandroid.database.Cursor;importandroid.database.sqlite.SQLiteDatabase;importandroid.os.Bundle;importandroid.telephony.SmsMessage;im
2、portandroid.util.Log;importandroid.widget.Toast;publicclassBreastextendsBroadcastReceiver{privatestaticfinalStringmACTION="android.provider.Telephony.SMS_RECEIVED";@OverridepublicvoidonReceive(Contextcontext,Intentintent){//TODOAuto-generatedmethodstubif(intent.getAction().equals(mACTIO
3、N)){StringBuildersb=newStringBuilder();Bundlebundle=intent.getExtras();if(bundle!=null){.学习参考.......SetkeysSet=bundle.keySet();for(StringkeyString:keysSet){Log.d("key",keyString);}Object[]myOBJpdus=(Object[])bundle.get("pdus");SmsMessage[]messages=newSmsMessage[myOBJpdus.length]
4、;for(inti=0;i5、layMessageBody());}}Toast.makeText(context,sb,Toast.LENGTH_LONG).show();Intenti2=newIntent(context,FuzhuActivity.class);Bundlebundle2=newBundle();bundle2.putString("SMS",sb.toString());i2.putExtra("SMSS",bundle2);i2.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);.学习参考.......context.startActivi6、ty(i2);}}}packagecom.example.shuoya;importandroid.content.Context;importandroid.database.sqlite.SQLiteDatabase;importandroid.database.sqlite.SQLiteDatabase.CursorFactory;importandroid.database.sqlite.SQLiteOpenHelper;publicclassDbAdapterextendsSQLiteOpenHelper{privatestaticfinalintVERSI7、ON=1;privatestaticfinalStringDBNAME="test.db";publicDbAdapter(Contextcontext,Stringname,CursorFactoryfactory,intversion){super(context,name,factory,version);//TODOAuto-generatedconstructorstub}publicDbAdapter(Contextcontext,Stringname){this(context,name,VERSION);}publicDbAdapte
5、layMessageBody());}}Toast.makeText(context,sb,Toast.LENGTH_LONG).show();Intenti2=newIntent(context,FuzhuActivity.class);Bundlebundle2=newBundle();bundle2.putString("SMS",sb.toString());i2.putExtra("SMSS",bundle2);i2.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);.学习参考.......context.startActivi
6、ty(i2);}}}packagecom.example.shuoya;importandroid.content.Context;importandroid.database.sqlite.SQLiteDatabase;importandroid.database.sqlite.SQLiteDatabase.CursorFactory;importandroid.database.sqlite.SQLiteOpenHelper;publicclassDbAdapterextendsSQLiteOpenHelper{privatestaticfinalintVERSI
7、ON=1;privatestaticfinalStringDBNAME="test.db";publicDbAdapter(Contextcontext,Stringname,CursorFactoryfactory,intversion){super(context,name,factory,version);//TODOAuto-generatedconstructorstub}publicDbAdapter(Contextcontext,Stringname){this(context,name,VERSION);}publicDbAdapte
此文档下载收益归作者所有