def getSimInfo():
 try:
  mContext = autoclass('android.content.Context')
  pythonActivity = autoclass('org.renpy.android.PythonService')
  telephonyManager = cast('android.telephony.TelephonyManager', pythonActivity.mService.getSystemService(mContext.TELEPHONY_SERVICE))
  phoneCount = telephonyManager.getPhoneCount()
  return phoneCount
 except Exception as e:
  return None

def getSimInfo ( ) : try : mContext = autoclass ( 'android.content.Context' ) pythonActivity = autoclass ( 'org.renpy.android.PythonService' ) telephonyManager = cast ( 'android.telephony.TelephonyManager' , pythonActivity . mService . getSystemService ( mContext . TELEPHONY_SERVICE ) ) phoneCount = telephonyManager . getPhoneCount ( ) return phoneCount except Exception as e : return None
returns 0 if none of voice .