Example how to use Android Safety Net to verify integrity of the android device.
https://developer.android.com/training/safetynet/index.html
To run this you need to create a key in google console
https://console.developers.google.com/
(if you just want the code, go to HomeFragment.java)