security - how to identify android mobile device uniqueid in xamarin android in c# -
for application, need trace users android device unique id, android devices give employees client , when use device open our application , type code. have check whether request came devices of our employees open app. if other people have app in phone though app not open. it's requirement client wants, googled lot found few links. tried not working
public static string getdeviceandroidid(context context) { string android_id = secure.getstring(context.getcontentresolver(), secure.android_id); if(android_id != null) return android_id; else return ""; }
tried not getting "context . getcontentresolver()" need assistance thanks.
try android.provider
namespace:
var android_id = android.provider.settings.secure.getstring(contentresolver, android.provider.settings.secure.androidid);
Comments
Post a Comment