def valid_android_zip(app_dir):
 try:
  print '[INFO] Checking for ZIP Validity and Mode'
  man = os.path.isfile(os.path.join(app_dir, 'AndroidManifest.xml'))
  src = os.path.exists(os.path.join(app_dir, 'src/'))
  if (man and src):
   return ('eclipse', True)
  man = os.path.isfile(os.path.join(app_dir, 'app/src/main/AndroidManifest.xml'))
  src = os.path.exists(os.path.join(app_dir, 'app/src/main/java/'))
  if (man and src):
   return ('studio', True)
  xcode = [f for f in os.listdir(app_dir) if f.endswith('.xcodeproj')]
  if xcode:
   return ('ios', True)
  return ('', False)
 except:
  PrintException('[ERROR] Determining Upload type')

def valid_android_zip ( app_dir ) : try : print '[INFO] Checking for ZIP Validity and Mode' man = os . path . isfile ( os . path . join ( app_dir , 'AndroidManifest.xml' ) ) src = os . path . exists ( os . path . join ( app_dir , 'src/' ) ) if ( man and src ) : return ( 'eclipse' , True ) man = os . path . isfile ( os . path . join ( app_dir , 'app/src/main/AndroidManifest.xml' ) ) src = os . path . exists ( os . path . join ( app_dir , 'app/src/main/java/' ) ) if ( man and src ) : return ( 'studio' , True ) xcode = [ f for f in os . listdir ( app_dir ) if f . endswith ( '.xcodeproj' ) ] if xcode : return ( 'ios' , True ) return ( '' , False ) except : PrintException ( '[ERROR] Determining Upload type' )
test if this is an valid android zip .