当我订阅 parse.com 服务上的几个频道时,它运行良好,如下所示:
ParseInstallation installation = ParseInstallation.getCurrentInstallation();
installation.addAllUnique("channels", Arrays.asList("CHANNEL_1", "CHANNEL_2", "CHANNEL_3", "CHANNEL_4"));
installation.saveInBackground();
但是,当我不对字符串进行硬编码时,它不起作用吗?
ParseInstallation installation = ParseInstallation.getCurrentInstallation();
String spinnerValue= mySpinner.getSelectedItem().toString();
installation.addAllUnique("channels", Arrays.asList(spinnerValue, "CHANNEL_2", "CHANNEL_3", "CHANNEL_4"));
installation.saveInBackground();
有谁知道为什么会这样?使用 Parse.com 时,我是否必须对所有频道进行硬编码?