如何在android中设置parse的安装对象列的值

Ahm*_*kol 2 android parse-platform

我正在尝试学习如何使用 parse,此时我想知道如何在初始化时设置列的值(“安装”对象)。

这是我的 onCreate 方法。

    public void onCreate() {
    super.onCreate();

    Parse.initialize(this, "****", "****");
    ParseInstallation.getCurrentInstallation().saveInBackground();
    ParsePush.subscribeInBackground("", new SaveCallback() {
        @Override
        public void done(ParseException e) {
            if (e == null) {
                Log.d("com.parse.push", "successfully subscribed to the broadcast channel.");
            } else {
                Log.e("com.parse.push", "failed to subscribe for push", e);
            }
        }
    });

}
Run Code Online (Sandbox Code Playgroud)

我添加了一个名为 MacID 的列。每当有人下载​​该应用程序时,我都想获取他们的 mac 地址并将其保存以解析对象。谢谢

Aki*_*kil 5

对于安装对象首先去解析网站,在安装类中创建需要的列。

然后在代码中

    ParseInstallation installation = ParseInstallation.getCurrentInstallation();
                 installation.put("column name",mcIdValue);
                 installation.saveInBackground();
Run Code Online (Sandbox Code Playgroud)