Download scripts for Android Scripting Environment - android

Downloaded ASE from google code, and was looking through tutorials, and available scripts.
I found a script I wanted to try, however copy pasting it is removing all whitespace (and this is a Python script...).
Is there a simple way to download a script from the internet into the Android Scripting Environment?

Copy the .py file to your SD card, under ase/scripts

Related

What and where is the app when I'm using cordova?

I apolagize in advance for the extreme noobiness of my question...
I'm on mac os and using cordova to build an app. I know nothing of java or c, so the only thing I did was to put my index, js and css files in the www folder and test it with the CLI.
$ cordova emulate /* with android and ios */
$ cordova run /* with android and ios */
$ cordova build
I was able to make the app work on android and ios virtual and real devices, and got the BUILD SUCCEEDED message on my terminal.
But to be honest none of this is familiar and if it wasn't for a tutorial I read one line at a time I wouldn't have been able to do it.
The probleme is the tutorial stops at the build step, and I can't find any other tutorial that explains very plainly and simply(not to say idiotically) how to go from there.
I'm left with lots of folder and have no idea what exactly is the app amongst all those files.
How can I put it on my website for download? Do I need an executable?
For iOS and android you would typically have two different types of files.
iOS uses .ipa files and android uses .apk files.
I am not sure about Cordova, but generally the cross platform software would generate those two types of files, these can then be put onto the device and run.
I'm sure you've found out more since 2014 but for others (like me landing here from google), in Windows, at the CMD command line, use
WHERE CORDOVA
..to find where the cordova builder is actually located.
For Android, your output is an *.APK file which should be announced at the very end for the cordova console output, eg:
C:/MyApps/TrialApp/phonegap/platforms/android/build/outputs/apk/android-debug.apk
..where C:\MyApps\TrialApp\phonegap\ is your phonegap project folder assuming you are using phonegap.
If you do not want to submit it to Google Play, you can host the *.apk on various hosts including your own site, a freebee like http://androidhost.org/ (care, may download trash to phones), http://slideme.org/ or https://www.voltcloud.io/ etc.
Hopefully that will give other newbies a heads up.

How do I list the contents of an Android APK file programmatically?

I need a list of all the files stored in a given APK file. I am using the NDK.
Challenges:
Get the path to the .APK file on the device.
Iterate through all of the files, recursing through the subdirectories.
You should be able to treat the apk file as if they are zip files.
Since you're working within NDK, you can try using a C++ library like 7-zip to help you browse through the zip file entries.
For the first part of your question, the path to the .apk on the device, refer to this question (it's on StackOverflow, so I won't bother recopying it).
For the second part your question, unzipping an .apk file on the device, download the source for Terminal IDE (Terminal IDE also works on non-rooted devices). Download its source from the download tab, not the browse source tab (which for some reason doesn't work right now).
It's a huge project mostly in Java (it's not exactly the language you're looking for), but it's well organized and remarkably readable.

How can I install sl4a modules without internet access?

I have the necessary .zip files in the root directory of /sdcard. The language installers insist on using the internet. I'm thinking the .zip files are in the incorrect directory. What directory do I put the files; or if that is the wrong question, how can I get any of the sl4a languages installed?
sl4a supports .yak files . sl4a works on Android Emulator as well.To use, use adb install sl4a_rnn.apk
Forget that those files are even available for download. Use the built-in mandatory installer only after giving up at trying to integrate sl4a into my Eclipse workspace; because there is already a free distribution of Python in the Google Play store :)

Exporting as .apk & project files location not known when using LuaEclipse (beginner)

I am trying to create an .apk file. I see a new .apk saved on my desktop, but it is just a file with an extension with no data inside it.
I just recently moved from Corona SDK to LuaEclipse and what I need now is an explanation on how to combine all my files.
I have had a .lua file with other data such as images and sounds in a Project Files folder (when using Corona). Now I want to export these all files as .apk (to export by using Eclipse), but I can't because I don't know where to find the location of Project Files in LuaEclipse in order to put .lua file and other files in it.
I am a beginner so I apologize if the problem is not clear.
LuaEclipse is not a tool for writing Lua applications. Or at least, not in the way you're trying to use it. It is an IDE, but since Lua is a scripting language, you need a runtime to make Lua scripts actually work.
Or to put it another way, LuaEclipse and Corona do completely different things. You can't replace Corona with LuaEclispe. Corona is a runtime for writing applications with Lua. LuaEclispe is just an Eclipse plugin that provides support for the Lua language. It doesn't provide an actual runtime.

How to use tweepy module with sl4a and py4a?

I am trying to build a twitter client written in python using tweepy and make it run on sl4a (using py4a) on Android. But i seem to fail to import tweepy module in my main script. The script does not run. Please tell me the correct way to use tweepy in sl4a because copy-pasting the tweepy directory in sl4a's scripts directory does not work.
Download the tweepy .egg for Python 2.6 here : https://pypi.python.org/pypi/tweepy/1.7.1 Make sure it is in the Downloads folder in your SD card. Launch the Python for Android app and select the "import module" option. Select the tweepy .egg file you just downloaded. It should work fine.
The Python for Android app allows you to import module zips, and there are instructions around the web and on the SL4A FAQ about where to copy modules to on the SD card to try and install them as well as installing Python Eggs [link]. You could also try running tweepy's setup.py (found in the download) on the phone.
However, it may also be possible that tweepy has other requirements not present on your phone, such as other modules that would normally be installed by easy_install or the like. While I don't think this is the case it would certainly make installing it very difficult.
At the end of the day, as per the FAQ, I think your best bet is to try copying the tweepy module directory into /sdcard/com.googlecode.pythonforandroid/extras/python.
Good luck!

Categories

Resources