当前位置: 代码迷 >> Android >> PendingIntent中的参数有关问题
  详细解决方案

PendingIntent中的参数有关问题

热度:92   发布时间:2016-05-01 09:48:59.0
PendingIntent中的参数问题
我需要构造一个发送短信的普通类,其中如下代码中的参数Context如何表示?用this是不行的,请问Context参数如何处理?多谢
PendingIntent pintent = PendingIntent.getBroadcast(context, requestCode, intent, flags)
发短信

------解决方案--------------------
activity或者service,appalication都是可以引用this的
其他的类里面  需要引用其他有context对象的引用
  相关解决方案