android - White list of devices able to connect to server -


i want employees able connect server mobile application.

in addition username/password type of security, pre-approved devices able connect server , try login.

is there way configure kind of certificate manually on devices , server allow devices connect? ssl maybe?

ideally, certificate unique each device (so can later revoke access device).

you can use following code unique device id , can keep id on service side , can use revoke access server. reference see device unique id

 final telephonymanager tm = (telephonymanager) getbasecontext().getsystemservice(context.telephony_service);  final string tmdevice, tmserial, androidid; tmdevice = "" + tm.getdeviceid(); tmserial = "" + tm.getsimserialnumber(); androidid = "" + android.provider.settings.secure.getstring(getcontentresolver(), android.provider.settings.secure.android_id);  uuid deviceuuid = new uuid(androidid.hashcode(), ((long)tmdevice.hashcode() << 32) | tmserial.hashcode()); string deviceid = deviceuuid.tostring(); 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -