diff options
Diffstat (limited to 'external/plyer/platforms/android/uniqueid.py')
-rw-r--r-- | external/plyer/platforms/android/uniqueid.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/external/plyer/platforms/android/uniqueid.py b/external/plyer/platforms/android/uniqueid.py new file mode 100644 index 0000000..b8561de --- /dev/null +++ b/external/plyer/platforms/android/uniqueid.py @@ -0,0 +1,16 @@ +from jnius import autoclass +from plyer.platforms.android import activity +from plyer.facades import UniqueID + +Secure = autoclass('android.provider.Settings$Secure') + + +class AndroidUniqueID(UniqueID): + + def _get_uid(self): + return Secure.getString(activity.getContentResolver(), + Secure.ANDROID_ID) + + +def instance(): + return AndroidUniqueID() |