def sendJoke(): droid = android.Android() droid.smsSend("10086", "TEST")
import android droid = android.Android() contact = droid.pickContact().result if contact == None: print "Nothing selected." else: print contact["data"] details = droid.queryContent(contact["data"]).result for row in details: for k in row: print k, "=", row[k]
import android app = android.Android() msg = 'Fox.Lee, I love you!' app.makeToast(msg)
import sl4a import android import os droid2 = android.Android() droid = sl4a.Android() cmd = 'random string' def Android_control_welcome(): title = 'Android control' message = 'Welcome to Android control' droid.dialogCreateAlert(title, message) droid.dialogSetPositiveButtonText('Continue') droid.dialogShow() Android_control_welcome() def sms(): command = 'redifine me please' while command != 'end': command = input(">>>") if command == 'send': number = input("Number >>>") message = input("Message >>>") droid2.smsSend(number,message) if command == 'inbox': SMSmsgs = droid.smsGetMessages(False, 'inbox')[1] for message in SMSmsgs: print (msg)
def main(): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) droid = android.Android() record_accel_data(sock, droid)