Questions tagged [sl4a]

Scripting Layer for Android, a library for executing scripting languages on Android

Scripting Layer for Android (SL4A) brings scripting languages to Android.

Currently supported languages are:

Soon: Scheme and Squirrel

233 questions
2
votes
1 answer

How do I install Perl Modules on Scripting Layer for Android (SL4A)?

I just installed SL4A to test Perl on my Motorola Milestone. Is there a way to install a module? I need LWP::Simple.
MauJFernandez
  • 346
  • 1
  • 4
  • 17
2
votes
1 answer

INFO Cannot find test class SampleTest skipping for now

I am using SL4A with ACTS (Android Comms Test Suite) for running some simple test case. but i am getting error as INFO Cannot find test class SampleTest skipping for now. here is my config class i.e Sample.json { "_description": "This is an…
Gaju Kollur
  • 2,046
  • 5
  • 23
  • 47
2
votes
2 answers

Creating an android service to run in the background using python

I would like to know if it is possible to run an android service in the background (and possibly on boot) without rooting the device, using python and sl4a and if so how would i go about doing that.
2
votes
2 answers

The best way to open two files

I need to open a file, read a line, hash it, and then save to a different file. Should I open both text files at the beginning of my script, or should I open each every time I save/read? I'm new to all this and I'm using python for android for sl4a.…
user3530608
  • 43
  • 1
  • 6
2
votes
3 answers

How do I obtain the Android context in BeanShell for SL4A?

I started exploring BeanShell for SL4A because I read that it could access the entire Android API. This would facilitate experimenting with API features and programming ideas without the need for a computer or compilation. However, much of the API…
James Haigh
  • 1,192
  • 1
  • 12
  • 25
2
votes
1 answer

Can't create file with Perl script on Android (using perl-android-apk)

I want to run a simple Perl script on Android. I am using perl-android-apk which makes it possible to include the Perl interpreter in one APK (based on SL4A). The project comes with a hello.pl script, which shows a toast. Alright, everything working…
c0dehunter
  • 6,412
  • 16
  • 77
  • 139
2
votes
1 answer

sl4a python make a Toast for android phone

I wrote only this 3 lines in python using SL4A: import android droid = android.Android() droid.makeToast(u"ascc4r") When this code runs, I get the following error: pydev debugger: starting Traceback (most recent call last): File…
user2287094
  • 267
  • 4
  • 13
2
votes
2 answers

Running Py4A script from external SD card?

I need to run the Python script from external SD card, which in the target device is mounted as /mnt/sdcard/_ExternalSD. I've succeeded to accomplish that in a quick&dirty way by preparing the "proxy" script ExtSDRun.py in the standard SL4A scripts…
wzab
  • 788
  • 7
  • 24
2
votes
2 answers

Python for Android APK without dependencies

Is it possible to build an APK using Python for Android that doesn't need Python for Android to be there, i.e. it includes Python? If so, how?
kirbyfan64sos
  • 10,377
  • 6
  • 54
  • 75
2
votes
2 answers

Launch an SL4A script from an SL4A script

I would like to start a background SL4A script (on a remote device) from within a different SL4A script. I can launch a script from a terminal by running something like this: $ am start -a…
Jeff Darcy
  • 69
  • 8
2
votes
1 answer

Start an Android Test from an Intent (or from SL4A)?

I'd like to run some android tests but I want to scedule or delay the execution of these tests. I'm trying to do this from SL4A. The idea is to install SL4A start the server from my laptop, run a special python script that will sleep for about 20…
Cliff
  • 10,586
  • 7
  • 61
  • 102
2
votes
1 answer

Using Python to get pixel value of a jpeg(SL4A android 4.0)

I am working on a project on my Samsung Galaxy Tab with Android 4.0 Ice-cream sandwich. Using python through SL4A I am trying to get the pixel RGB value of a jpeg(or png) image of a give co-ordinate (x,y).
2
votes
2 answers

Launch SL4A Application via adb shell

I have tried variations on starting activities including this link and the Google prescribed way of starting a background script in SL4A. However I only need to know the command for opening the actual SL4A application through the adb shell. It is…
onetwopunch
  • 3,279
  • 2
  • 29
  • 44
2
votes
1 answer

Using Python android.py module without SL4A

Is there a way to use android.py module without installing SL4A? I mean I have Python running on android successfully from Terminal Emulator. Can I use that module without installing that layer (or if I can't install it anymore)?
Крайст
  • 776
  • 1
  • 9
  • 22
2
votes
1 answer

Is it necessary to have SL4A pre-installed on the android device to run apps developed in python?

I understand that we need to install in the device we test, Once we start distributing the app, Is it necessary that the clients' Android device has SL4A previously installed or can we pack it with the application?
dvabhishek
  • 21
  • 2