If I use phone A's number to verify an app'X' on phone B. And then install app'X' on phone A and verify the app with its number, Then I have verified two handsets with same mobile number. How can I detect this on the server and restrict such operation ? This can usually happen when the user owns both the handset/phones.
Asked
Active
Viewed 121 times
2
-
1Related documentation from Google: https://developer.android.com/training/articles/user-data-ids.html also see https://developer.android.com/training/articles/user-data-ids.html#g_manage_telephony_&_carrier_functionality – Morrison Chang Sep 22 '17 at 07:42
1 Answers
2
you can get the IMEI Number of both phones by this code :
TelephonyManager telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String IMEI = telephonyManager.getDeviceId();
and check that the IMEI Number is differ for both phones because IMEI number is unique for every device.
And you should add the following permission into your Manifest.xml file:
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

chandrakant sharma
- 1,334
- 9
- 15
-
-
yes, its works and its standard practise. and if you find my answer helpful please mark it as accepted answer – chandrakant sharma Sep 22 '17 at 07:43