mirror of
https://github.com/liberatedsystems/Sideband_CE.git
synced 2024-09-03 04:13:27 +02:00
29 lines
545 B
Python
29 lines
545 B
Python
|
'''
|
||
|
Module of Android API for plyer.uniqueid.
|
||
|
'''
|
||
|
|
||
|
from jnius import autoclass
|
||
|
from plyer.platforms.android import activity
|
||
|
from plyer.facades import UniqueID
|
||
|
|
||
|
Secure = autoclass('android.provider.Settings$Secure')
|
||
|
|
||
|
|
||
|
class AndroidUniqueID(UniqueID):
|
||
|
'''
|
||
|
Implementation of Android uniqueid API.
|
||
|
'''
|
||
|
|
||
|
def _get_uid(self):
|
||
|
return Secure.getString(
|
||
|
activity.getContentResolver(),
|
||
|
Secure.ANDROID_ID
|
||
|
)
|
||
|
|
||
|
|
||
|
def instance():
|
||
|
'''
|
||
|
Instance for facade proxy.
|
||
|
'''
|
||
|
return AndroidUniqueID()
|