|
@@ -195,6 +195,7 @@ public class MainActivity extends BaseFragmentActivity implements MineFragment.o
|
195
|
195
|
if(isOpenSetting){
|
196
|
196
|
return;
|
197
|
197
|
}
|
|
198
|
+ SPUtil.putAndApply(this,Constant.System.SWITCH_SETTING,true);
|
198
|
199
|
CustormDialog custormDialog = new CustormDialog(this).builder().setTitle("提示").setMsg("请打开通知栏通知,方便接收消息提示").setNegativeButton("取消", new View.OnClickListener() {
|
199
|
200
|
@Override
|
200
|
201
|
public void onClick(View view) {
|
|
@@ -203,7 +204,11 @@ public class MainActivity extends BaseFragmentActivity implements MineFragment.o
|
203
|
204
|
}).setPositiveButton("去设置", new View.OnClickListener() {
|
204
|
205
|
@Override
|
205
|
206
|
public void onClick(View view) {
|
|
207
|
+ try {
|
|
208
|
+ //防止出现没注册成功的时候,会抛出异常
|
206
|
209
|
PushManager.getInstance().openNotificationSettings();
|
|
210
|
+ }catch (Exception e){
|
|
211
|
+ }
|
207
|
212
|
}
|
208
|
213
|
}).setCancelable(false);
|
209
|
214
|
custormDialog.show();
|