0

I am new to Android development and am using MIT App Inventor 2, as I was completely lost in the official Android development tutorials. Below is the description of the program and the problem.

I am taking an unknown number of inputs from the user (from a listPicker), which are then saved to a global list. I want to run a python code with arguments sourced from this global list. The python code then churns this data along with input from 3 other text files, and returns back a list which I want to display in the app.

I have created both the android app and the python code, but I need to link them somehow. I tried Skulpt, but I am not sure how to get the 3 files to be read into python using that. I also tried Activity Starter, but can't figure out how to get that to fire up the QPython to execute the python script with these files, and give back the output.

Any suggestions to do this, or any other tools which can be used are welcome.

Sahil M
  • 1,790
  • 1
  • 16
  • 31
  • Probably my [Skulpt](https://puravidaapps.com/skulpt.php) example can help? Btw. why don't you translate your Python code into App Inventor and run it completely there? – Taifun Aug 20 '15 at 16:29
  • It runs a Bayesian classifier on a set of data-sets and makes some predictions, I don't know how to do that in App Inventor . I finally got QPython working with it. I found the class, package info and extras in a piece of code online. Trying to extract the results and run it in background at this point, it shows a foreground terminal and then has to be manually exited. Do you know of a workaround? – Sahil M Aug 20 '15 at 19:53
  • sorry, I'm not familiar with QPython, probably there is a possibility to exit programmatically? – Taifun Aug 20 '15 at 22:18
  • Haven't figure out a way yet, still at it. I tried Skulpt again, the problem I was facing was that I couldn't get it to read the 3 files I mentioned above. For some reason python doesn't accept the absolute, or relative path of the files specified in the code. Would you know why that would be the case? – Sahil M Aug 21 '15 at 00:00
  • The App Inventor webviewer can't read files. Take a look again at my [Skulpt example](https://puravidaapps.com/skulpt.php) to find out what is possible with App Inventor. – Taifun Aug 21 '15 at 21:32

0 Answers0