avos 退订推送频道

新手上路,请多包涵

AVOSCloud.initialize(this, "x", "x");

    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.outchanel);



    button1 = (Button) findViewById(R.id.button1);
    button1.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {

            // TODO Auto-generated method stub
            PushService.setDefaultPushCallback(OutChanel.this, PushDemo.class);
            //退出当前频道
            PushService.unsubscribe(OutChanel.this, "autobus1234");
            //PushService.unsubscribe(OutChanel.this, "public");
            AVInstallation.getCurrentInstallation().saveInBackground();
        }


    });

提示错误信息 please call avoscloud.initialize at first in application

阅读 2.7k
1 个回答

这个错误信息很明显,没有在 Application.onCreate 中做应用初始化,也就是调用
AV.initialize 方法

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题