android中 PendingIntent getService ()flags参数

小类人猿 2015-11-03 11:27:30
 
PendingIntent pi1 = PendingIntent.getService(AlarmActivity.this, 0, intent, 0);
我在写定时的时候,用到了这个函数,原型是
public static PendingIntent getService (Context context, int requestCode, Intent intent, int flags),
看到最后一个参数android官网给出的解释是:May be FLAG_ONE_SHOT, FLAG_NO_CREATE, FLAG_CANCEL_CURRENT, FLAG_UPDATE_CURRENT, or any of the flags as supported by Intent.fillIn() to control which unspecified parts of the intent that can be supplied when the actual send happens.但是这些参数没有0这个参数,请问大家这个参数的含义到底是什么,还有这个参数中的0是什么含义?谢谢大家!
...全文
296 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
小类人猿 2015-11-04
  • 打赏
  • 举报
回复
别沉啦!大家帮忙看一下,谢谢!
小类人猿 2015-11-03
  • 打赏
  • 举报
回复
   PendingIntent pi1 = PendingIntent.getService(AlarmActivity.this, 0, intent, 0); 我在写定时的时候,用到了这个函数,原型是 public static PendingIntent getService (Context context, int requestCode, Intent intent, int flags), 看到最后一个参数android官网给出的解释是:May be FLAG_ONE_SHOT, FLAG_NO_CREATE, FLAG_CANCEL_CURRENT, FLAG_UPDATE_CURRENT, or any of the flags as supported by Intent.fillIn() to control which unspecified parts of the intent that can be supplied when the actual send happens.但是这些参数没有0这个参数,请问大家这个参数的含义到底是什么,还有这个参数中的0是什么含义?谢谢大家!

80,475

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧