1)由于我使用Timer在Service的Binder内进行计时操作,导致Service关闭后计时仍在继续执行直到被垃圾回收,这种情况我需要在Binder中再写一个stop()方法执行timer.cancel()操作,在Service的onDestroy()中执行binder.stop()
2)在Notification自定义布局的button中设置点击事件需要调用contentView.setOnClickPendingIntent(R.id.btn_xxx,pendingIntent),pendingIntent的intent里面只传action名不putExtra的话receiver是接收不到这个广播的
3)activity调用bindService(mIntent, mConnection,BIND_AUTO_CREATE);
之后无法直接调用stopService(),将BIND_AUTO_CREATE换成0之后才可以直接调用stopService