You can use the Android id. This id should be unique to devices, but how it is set depends on the implementation of the device manufacturer.
String deviceId = Secure.getString(context.getContentResolver(),Secure.ANDROID_ID);
The Android Id may change on factory reset of the phone and the user is also able to change it on rooted phones. But if you need an id to identify your user it should be fine.