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
3
votes
2 answers

Is SL4A Project Active?

Is the project Scripting Layer for Android (SL4A) actively developed or used for applications these days? If not what are the alternatives available for scripting (Python) on android? It appears to be some what obsolete, no update since…
Keerthi Bandara
  • 159
  • 1
  • 7
3
votes
1 answer

Sl4a recognize speech in background

I am started programming sl4a (in QPython) and it is really great. Now I tried to use the droid.recognizeSpeech function. This one works fine too, but I like to get it in the background listening for a keyword, like Google's 'OK Google'. So I looked…
Tom Hans
  • 123
  • 1
  • 1
  • 6
3
votes
1 answer

Does Google still support SL4A for Android?

Does Google still support SL4A for Android. I have created an apk file for SL4A which is A6 using the old source code, could anyone kindly let me know if the source code for SL4A is available for the latest Android version(A16>).
3
votes
1 answer

Socket communication between android and computer sl4a

I have an android phone running a client.py and a server.py running in my computer. My computer's ip is set to 192.168.16.7 (running ubuntu 13.04. Did it in the network manager) and my phone's ip is set to 192.168.16.9. I created a wifi hotspot…
3
votes
1 answer

Equivalent of sys.exit() of Python in JavaScript

I m using SL4A to execute Python/Javascripts in Android. Can anyone let me know the equivalent of sys.exit() of Python in JavaScript? Thanks!
user1741274
  • 759
  • 3
  • 13
  • 25
3
votes
1 answer

How to detect if menu button was pressed using sl4a?

Is there a way to detect if the 'menu/settings' button has been pressed on an Android phone using sl4a? I was looking through the API reference, and it looks like the 'Events' section is what I need, but it doesn't specify anything about either the…
Michael0x2a
  • 58,192
  • 30
  • 175
  • 224
3
votes
1 answer

Return Result from a python script using SL4A back to Android App

i am trying to get result from a python script using (SL4A) after calling startActivityForResult() in my java android app. However i always get a null intent in my onActivityResult() Running the python Script from my Java app public static Intent…
ZeroG
  • 121
  • 2
  • 7
3
votes
1 answer

Using SL4A (Python) and bluetooth

Looking for some pointers to get me started. In my left hand I have a SGS2 running ICS. I've got SL4A up and running and have installed Python 2.6.2 In my right hand I've got a generic chinese bluetooth RFID reader. It works, it reads tags (it has a…
Eric T
  • 220
  • 1
  • 4
  • 10
2
votes
1 answer

How to open a script in sl4a script editor, programmatically from another script?

I'm new to Android python scripting with SL4A, but familliar with python. the question I have is, How to open a script in sl4a script editor, programmatically from another script? my english is not goodenough to explain my problem, so I show it with…
Rebel
  • 23
  • 4
2
votes
2 answers

Android Python get gps status

New to Android Python scriptring comming from Symbian PyS60. I want to port my gps info PyS60 app to Android sl4a Python. I can get the location but that is about all. From API docs and Java examples it would seem that something like: import…
user1224214
  • 21
  • 1
  • 2
2
votes
1 answer

Python Computer -to- Android Phone

I am trying to write server code for my python computer and make the android phone a client. The client needs to be able to send its location as well as be able to get data from the server and should run in the background and start itself every 5…
tabchas
  • 1,374
  • 2
  • 18
  • 37
2
votes
1 answer

Using timeit() and hypothesis test for means

I've had some problems using timeit() as an accurate benchmark when comparing longer (> 1 lines) code snippets for SL4A on Android. I get a pretty high variation when comparing times. (Possibly something to do with the way android/dalvik vm…
Joel Cornett
  • 24,192
  • 9
  • 66
  • 88
2
votes
2 answers

How to integrate my Android app with SL4A?

I want to integrate my app with SL4A. In order to let the user to do something in reponse to events in my app i'd like to send intents with data to SL4A or just execute sl4a script in the file using filename. How can this be done? EDIT: i don't want…
Anton
  • 1,903
  • 3
  • 16
  • 18
2
votes
5 answers

Run python Script in android application

I want to get list of installed software on remote computer.For that I want to use python script in my android application.Now,I have a python script which is getting the list of installed software on remote computer.But,I don't know how to make it…
krushnakant
  • 431
  • 9
  • 21
2
votes
2 answers

Passing parameters to a python script using SL4A on Android

I am trying to get a Python script which I normally run on my PC to run on my Android phone (HTC Hero). I have SL4A running on my phone and have made a few tweaks to the Python script so that this does now run. The problem that I am having is how to…
infojolt
  • 5,244
  • 3
  • 40
  • 82