Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/223.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在android中为parse.com安装表中的频道添加值时出错?_Android_Database_String_Parse Platform - Fatal编程技术网

在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){
//成功
}否则{
//错误
}
}
});