我想为我的应用创建一个唯一 ID。如以下链接所示
我想使用 InstanceID 作为唯一 ID。
String uniqueID = InstanceID.getInstance(context).getId();
由于某些配置设置,我的服务器希望唯一 ID 仅使用小写字母。作为实例 id 给出了小写和大写字符。我正在考虑将每个实例 ID 字符转换为其相应的 ASCII 值,并将其作为我的唯一 ID 发送。这会是正确的方法吗?
另外,我正在阅读有关 FirebaseInstaceId
https://firebase.google.com/docs/reference/android/com/google/firebase/iid/FirebaseInstanceId
是否建议使用 FirebaseInstanceId 而不是 Instance Id?我没有在任何地方的文档中找到它。请建议。
谢谢。