summaryrefslogblamecommitdiff
path: root/external/plyer/platforms/android/uniqueid.py
blob: b8561de4aae61bc3655767e652d558ddf9255e6a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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()