Recently developers have asked us for suggestions about collecting fingerprints across devices (web, iOS & android). Here are some ideas:
Web Browsers
To collect fingerprints on the web, our suggestion is to use Valve's Fingerprint.js2.
Just import the JS file and do the following
new Fingerprint2().get(function(result){
// this will use all available fingerprinting sources
console.log('This is the fingerprint '+result);
});
iOS
For iOS we suggest using UIDevice currentDevice method. Its pretty straightforward. Here is an example
#pragma mark - get device ID
- (NSString *)deviceID{
return [NSString stringWithFormat:@"%@-AAPL",[UIDevice currentDevice].identifierForVendor.UUIDString];
}
Android
For android we suggest using a logic like the following
public static String getDeviceID(Context activity) {
String androidID = Settings.Secure.getString(activity.getContentResolver(),Settings.Secure.ANDROID_ID);
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(Build.MANUFACTURER.toUpperCase()+"-");
stringBuilder.append(Build.MODEL+"-");
stringBuilder.append(androidID);
stringBuilder.append("-GOOG");
androidID = stringBuilder.toString();
return androidID;
}
Thats it. Please let us know if you have any questions.