<span style="font-size:14px;">
@Override
protected void onResume(){
super.onResume();
JPushInterface.onResume(this);
}
@Override
protected void onPause(){
super.onPause();
JPushInterface.onPause(this);
}
</span>
加到应用的第一个加载的activity生命周期中就好了