从device_id和device_token创建数据库。哪个组件是唯一的设备ID或设备令牌?

时间:2016-07-07 07:27:32

标签: android ios database mobile window

  

假设我有两个不同的应用A和B.

如果我在IOS, Android, Window mobile上安装了这两个应用。安装后, 然后我卸载这些应用程序然后在IOS,Android和Window mobile上重新安装which component is unique device ID or device token

A and B:
IOS: device ID or device token??
Android: device ID or device token??
Window: device ID or device token??
  

如何区分每台设备上唯一的A和B应用安装?

我正在创建数据库:

id, platform ( 1=> android,2=> ios, 3 => window), request_coming_from ( A=> A app, B=> B app), device_id, device_token, created,modified

1, 1, A, ????, ???? , 2016-07-07 12:02:34,2016-07-07 12:02:34
2, 1, B, ????, ???? , 2016-07-07 12:02:34,2016-07-07 12:02:34
3, 2, A, ????, ???? , 2016-07-07 12:02:34,2016-07-07 12:02:34
4, 2, B, ????, ???? , 2016-07-07 12:02:34,2016-07-07 12:02:34
5, 3, A, ????, ???? , 2016-07-07 12:02:34,2016-07-07 12:02:34
6, 3, B, ????, ???? , 2016-07-07 12:02:34,2016-07-07 12:02:34

每次在每台设备上打开应用程序时,它都会点击API并从中获取 我将存储platform,request_coming_from,device_id,device_token,并且创建和修改日期是系统的当前日期时间。

If you have any idea and effective way to store device_id and device_token in database?

  

这样我才能计算出多少手机应用(A& B)   安装在不同的移动设备上(不是同一个移动设备。)

     

示例:

Mobile (M1 - android):



A is install

Mobile (M2 - ios)

A is install 
B is install


Mobile (M3 - ios)

B is install

Mobile (M4 - window)

B is install
  

输出:

A => 
      1=> android
      1=> ios 

B=>
    2 => ios
    1=> window 

1 个答案:

答案 0 :(得分:0)

将Android ID用作唯一值

String androidId = Secure.getString(context.getContentResolver(), "android_id");

查看此信息以获取更多信息..

https://developer.android.com/training/articles/user-data-ids.html