def getAndroidID():
 try:
  pythonActivity = autoclass('org.renpy.android.PythonService')
  settingsSecure = autoclass('android.provider.Settings$Secure')
  androidId = settingsSecure.getString(pythonActivity.mService.getContentResolver(), settingsSecure.ANDROID_ID)
  return androidId
 except Exception as e:
  return None

def getAndroidID ( ) : try : pythonActivity = autoclass ( 'org.renpy.android.PythonService' ) settingsSecure = autoclass ( 'android.provider.Settings$Secure' ) androidId = settingsSecure . getString ( pythonActivity . mService . getContentResolver ( ) , settingsSecure . ANDROID_ID ) return androidId except Exception as e : return None
returns none if an error .