1

I have a Python script that I just about have perfected.

I had hoped to turn it into Java easily without having to know too much Java, my goal is to make this easily run on Android or iOS.

It is essentially a farming robot for a game I play with a bunch of friends. It is mainly working with Http requests but I know very little Java and I'm having a hard time even getting started. I see how to make a request but dont know enough about Java to decode a JSON return.

Any advice? I had thought about compiling with Jython but I'm not sure that will help me either. Im trying to keep this very simple and not use the Android python scripting which is a pain to setup. I did really want to walk every person through the setup on their phones.

Joachim Sauer
  • 278,207
  • 54
  • 523
  • 586
  • You should take a look at [sl4a](https://code.google.com/p/android-scripting/), which lets you run python code on android. – BrtH Aug 23 '12 at 17:00
  • I have sl4a, but its a pain in the butt to walk people through how to install it since most phones are different. On my phone I love sl4a – toyotajon93 Aug 23 '12 at 17:11
  • Maybe [this](http://stackoverflow.com/questions/5704480/how-can-i-package-the-whole-python-interpreter-in-an-android-apk), [this](https://code.google.com/p/android-scripting/wiki/SharingScripts) and [this](https://android-scripting.googlecode.com/files/Pro_Android_Python_with_SL4A_Ch10_Packaging_and_Distributing.pdf) can help with packaging your app. – BrtH Aug 23 '12 at 17:16
  • Maybe I wasnt doing that part right, everytime I tried to install on Phone it errored – toyotajon93 Aug 23 '12 at 17:32
  • Can I use my python code directly into Kivy or the template APK? – toyotajon93 Aug 23 '12 at 18:56
  • Don't know, haven't used it yet, I stumbled upon it once... – BrtH Aug 23 '12 at 20:50

1 Answers1

0

Some information links

Some information about JSON in java here
Some information about http request here

Community
  • 1
  • 1
Ishikawa Yoshi
  • 1,658
  • 6
  • 21
  • 42
  • Yep, I have read those extensively, the structure I'm using for my http request is pretty much that second link.. The JSON isnt as big a deal, it's mainly parsing out of the JSON return code. – toyotajon93 Aug 23 '12 at 17:11