This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #-*-coding:utf8;-*- | |
| import androidhelper | |
| droid = androidhelper.Android() | |
| apps = droid.getLaunchableApplications().result | |
| print(apps) | |
| running_packages = droid.getRunningPackages().result | |
| print(running_packages) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from androidhelper import Android | |
| droid = Android() | |
| ret1 = droid.makeToast("Hello").result | |
| #ret2 = droid.getPassword("password","Please input").result | |
| ret3 = droid.notify("notify title","notify message", "https://www.qpython.org").result | |
| ret4 = droid.getNetworkStatus().result | |
| ret5 = droid. sendEmail("support@qpython.org", "Hello", "This is the body").result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from androidhelper import Android | |
| droid = Android() | |
| ret1 = droid.environment().result | |
| ret2 = droid.log("hello").result | |
| ret3 = droid.getConstants("org.qpython.qpy3.MIndexActivity").result | |
| print([ret1,ret2, ret3]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from androidhelper import Android | |
| droid = Android() | |
| droid.vibrate(1000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from androidhelper import Android | |
| droid = Android() | |
| clipboard = droid.getClipboard().result | |
| droid.makeToast("clipboard: %s" % clipboard) | |
| input(">Enter 1 continue\n") | |
| #setClipboard | |
| droid.setClipboard("Hello World") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from androidhelper import Android | |
| droid = Android() | |
| count = droid.smsGetMessageCount(False) | |
| print("%s messages" % count.result) | |
| messages = droid.smsGetMessages(False, "inbox").result | |
| for message in messages: | |
| print(" Message(%s): From %s, %s" % (message.get('_id'), message.get('address'), message.get('body'))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from androidhelper import Android | |
| droid = Android() | |
| number = droid.dialogGetInput("Phone Number", "Input the phone number you want to send hello").result | |
| droid.phoneCallNumber(number) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from androidhelper import Android | |
| droid = Android() | |
| number = droid.dialogGetInput("Phone Number", "Input the phone number you want to send hello").result | |
| droid.phoneDialNumber(number) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from androidhelper import Android | |
| droid = Android() | |
| number = droid.dialogGetInput("Phone Number", "Input the phone number you want to send hello").result | |
| droid.smsSend(number,"hello") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| from androidhelper import Android | |
| droid = Android() | |
| droid.startTrackingPhoneState() | |
| time.sleep(1) | |
| pstate = droid.readPhoneState().result | |
| print("phone state:"+str(pstate)) | |
| droid.stopTrackingPhoneState() |