在android中为parse.com安装表中的频道添加值时出错?
我试图为在android中为parse.com安装表中的频道添加值时出错?,android,database,string,parse-platform,Android,Database,String,Parse Platform,我试图为parse.com中安装表中的频道添加值,但出现以下错误: java.lang.IllegalArgumentException:通道名称无效 我试图添加以数值开头的值,但当值以字符串开始时,它会被插入。我如何解决这个问题 ParseInstallation install = ParseInstallation.getCurrentInstallation(); PushService.subscribe(getApplicationContext(), value, <curr
parse.com
中安装表中的频道添加值,但出现以下错误:
java.lang.IllegalArgumentException:通道名称无效
我试图添加以数值开头的值,但当值以字符串开始时,它会被插入。我如何解决这个问题
ParseInstallation install = ParseInstallation.getCurrentInstallation();
PushService.subscribe(getApplicationContext(), value, <currentClass>.class);
install.saveInBackground();
ParseInstallation=ParseInstallation.getCurrentInstallation();
订阅(getApplicationContext(),value,.class);
安装.saveInBackground();
谢谢。此代码适合我
ArrayList<String> channelsToAdd = new ArrayList<String>();
ParseInstallation.getCurrentInstallation().addAllUnique("channels", channelsToAdd);
ParseInstallation.getCurrentInstallation().saveInBackground(
new SaveCallback() {
@Override
public void done(ParseException e) {
if (e == null) {
//success
} else {
//error
}
}
});
ArrayList channelsToAdd=new ArrayList();
ParseInstallation.getCurrentInstallation().addAllUnique(“通道”,channelsToAdd);
ParseInstallation.getCurrentInstallation().saveInBackground(
新的SaveCallback(){
@凌驾
公共作废完成(Parsee异常){
如果(e==null){
//成功
}否则{
//错误
}
}
});