Closed truedat101 closed 10 years ago
It turns out it is difficult to accomplish much more than a simple script launch using the existing SL4a design. You need to put your scripts under res/raw , and this doesn't pick up any additional scripts we need, like CherryPy.
As a result, the integrated SL4A APK template fails because it fails. If you look in the APK, there is no cherry py getting picked up.
I discovered at the bottom of an SL4A wiki page that there is something better:
https://github.com/devpack/android-python27
I tried this out. It lets you integrate the Interpreter (without an extra download), and the scripts into a zip file. Brilliant.
Seems to work, and is based off the work of SL4a. To make this work as a short term stop gap solution, let's integrate MCPService into a zip file, mcpservice.zip (includes mcpservice.py and cherrypy dir). This is copied into res/raw. I'll refactor the naming to use a custom package. We can't really use the default com.android.python27 package name, as this will conflict with the next person that installs this same template project.
To clean this up further, don't let the apk appear in the jobs activities, and don't show it even as a launcher item. Let's just make it launch as an intent from EpochWatchdog.
Also, we must note that the first run requires an installation. It unpacks the python runtime, which will take about 30-60 seconds to install.
Refactor of the template project must be performed first: http://code.google.com/p/android-python27/wiki/TutorialHowToCreateCustomAPK
To wrap this up, we need to create the directory to store the screen grabs.
Fix is in. It's fine for now, but we probably want to think about making sure we get the external storage using the Environment class in android.
We should decrease the timeout to about 7 sec between screengrabs.
This seems fine.
Close as soon as we resolve #102 .
Close, as we've got the mcp tts off.
It is a multi step process to install the SL4A + Python, and worse, another step to run the sl4a, and another step to make sure MCPService is started.
Customer would like an easier process.