android.app.RemoteServiceException: Bad notification posted from package 异常解决
在android4.0一下的版本,使用 noticManager.notify()一个notification 必须要设定一个 pendingintent 不然系统会异常抛出。
所以在notification初始化前填下如下代码即可
PendingIntent pendingintent = PendingIntent.getActivity(this, 0, new Intent(), PendingIntent.FLAG_CANCEL_CURRENT);
notification.contentIntent=pendingintent;