运用TelephonyManager实现来电提醒.pptx

基于Android的应用程序开发 运用TelephonyManager实现来电提醒基于Android的应用程序开发 学习目标TelephonyManager获取实例监听来电短信提醒132 系统ServiceTelephonyManager tManager=(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); 监听来电监听手机来电状态tManager.listen(listener, PhoneStateListener.LISTEN_CALL_STATE); 发送短信实例化 SmsManagerSmsManager sManager=SmsManager.getDefault(); 发送短信实现发送功能pi=PendingIntent.getActivity(MonitorPhone.this, 0, new Intent(), 0);sManager.sendTextMessage(“1509882****,null, incomingNumber, pi, null); 程序设计流程添加权限uses-permission android:name=android.permission.SEND_SMS/ 谢谢关注!

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档