gpt4 book ai didi

android - 获取设备 token ?

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:53:26 25 4
gpt4 key购买 nike

我正在尝试获取我设备的 token 。这么想:

ParseInstallation parseInstallation = new ParseInstallation();
String deviceToken = (String) parseInstallation.get("deviceToken");

可以解决这个问题,但它没有,它返回 null。为什么?

最佳答案

读这个。希望这会有所帮助。

http://android-developers.blogspot.be/2011/03/identifying-app-installations.html

String android_id = Settings.Secure.getString(getApplicationContext().getContentResolver(),
Settings.Secure.ANDROID_ID);

您可以尝试获取 UUID 或 IMEI。

如果您使用的是 Parse 开发者控制台: enter image description here

关于android - 获取设备 token ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22713363/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com