2016-07-07 33 views
0

假設我有兩個不同的應用程序A和B.從device_id和device_token創建數據庫。哪個組件是唯一的設備ID或設備令牌?

如果我在IOS, Android, Window mobile安裝這兩個應用程序。安裝後, 然後我卸載這些應用程序,然後重新安裝IOS,Android和Window移動然後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和開放從中 我將存儲平臺,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)的多少nuumber 安裝在不同的移動(未同一移動。)

實施例:

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 

回答