While fetching device id in Samsung Galaxy Player 3.6 running Android GingerBread 2.3.6 app crashes. Line of code used:
((TelephonyManager) activity.getSystemService( Context.TELEPHONY_SERVICE )).getDeviceId();
This line of code returns a null value. It doesn’t work specifically with device mentioned above. We have tested on HTC One X, LG devices and Morola Droid as well as on Samsung Ace and Samsung S.
This is, because the Galaxy Player is no phone. Therefore it has no
TELEPHONY_SERVICE.To get a unique identifier for each Android device, see this official blog post:
http://android-developers.blogspot.com/2011/03/identifying-app-installations.html