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
这个错误信息很明显,没有在 Application.onCreate 中做应用初始化,也就是调用
AV.initialize 方法