Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Download the files to your computer, yada yada
- 2. Modify main.py lines 235-237 to look like this. Replace the stuff "<your_username>" with "azn_dude1" for example:
- parser.add_argument("-u", "--username", help="PTC Username", default="<your_username>", required=False)
- parser.add_argument("-p", "--password", help="PTC Password", default="<your_password>", required=False)
- parser.add_argument("-l", "--location", help="Location", default="<your_location>", required=False)
- 3. Copy the files to /storage/emulated/0/com.hipipal/qpylus/scripts. On some Android devices, the "0" directory might be called "legacy".
- 4. Install the 4 packages in QPython (click on Libraries->Pip console, then type "pip install protobuf geopy requests s2sphere", no quotes.)
- 5. In QPython, go to Programs->click on main.py and it should work.
- BONUS: To use your device's GPS coordinates to specify the location, make the following changes:
- 1. Add this line to the top of the file:
- import androidhelper as android
- 2. In the main() (around where you made the changes in the previous step 2), add these lines to the top:
- droid = android.Android()
- droid.startLocating()
- myloc = droid.getLastKnownLocation()
- droid.stopLocating()
- mylat = myloc.result['gps']['latitude']
- mylong = myloc.result['gps']['longitude']
- 3. Finally, instead of "default=<your_location>" (in that last line you modified in the previous step 2), put
- default=str(my_lat) + ', ' + str(mylong)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement