Created
May 25, 2014 12:53
-
-
Save wattnotions/94aa42725dd05fbfbb22 to your computer and use it in GitHub Desktop.
Opens phone bluetooth module and connects with computer
This file contains 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
#qpy:console | |
from androidhelper import Android | |
droid = Android() | |
if droid.checkBluetoothState().result == True: | |
print 'Bluetooth is on' | |
print " Phone info:" + str(droid.bluetoothGetLocalName()) | |
print "Computer info: " + str(droid.bluetoothGetRemoteDeviceName(address='88:53:2E:E8:65:4C')) | |
droid.bluetoothConnect(address='88:53:2E:E8:65:4C') # connect to computer | |
print "Active connections : " + str(droid.bluetoothActiveConnections()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment