首页 > 其他 > 详细

PendingIntent Bundle null解决方案

时间:2015-11-21 13:03:01      阅读:246      评论:0      收藏:0      [点我收藏+]

在安卓开发中,用通知栏,如果点击通知栏条目,跳转Intent需要传值的时候会出现问题,传入值失败。

Intent intent;  
PendingIntent sender=PendingIntent.getService(this, 0,   
intent=new Intent(this, PlacesProximityHandlerService.class), 0);  

intent.setAction("PlacesProximityHandlerService"); 
intent.putExtra("lat", objPlace.getLat()); 

  

需要给intent额外设置一个action动作,那样就不会出问题了。

PendingIntent Bundle null解决方案

原文:http://www.cnblogs.com/spring87/p/4983557.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!