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
0
votes
1 answer

Python : passing a dictionnary as a parameter (sl4a)

I'm learning python, working with the sl4a to make a phone app. I'm having trouble with a dictionnary when passing it as a parameter. I've searched to see if someone had that problem already and found some alike questions but couldn't figure my…
LionelM
  • 15
  • 5
0
votes
1 answer

Android/python : is ttsSpeak non blocking?

I have written a small app on Android using python (Qpython3) with voice synthesizer & voice recognition. droid = sl4a.Android() droid.ttsSpeak("hello") v = str(droid.recognizeSpeech() droid.ttsSpeak(v) The synthesized voice is then saying a first…
Pierre G.
  • 4,346
  • 1
  • 12
  • 25
0
votes
0 answers

how to resove smsSend() error in sl4a python

i am using Android , i want to send sms using this sl4a python code: it is related to my project. import android droid = android.Android() number = droid.dialogGetInput('Send SMS', 'Phone Number?').result message = 'Test SMS' result =…
sulabh
  • 1
  • 1
0
votes
1 answer

sl4a permission issue after android upgrade

I installed Sl4A via this link : https://electrum.org/android.html I wanted to run electrum on my Nexus 10. installation went fine, electrum was working (send & receiving btc). Then, I upgraded to Android 5 (last version, lolipop I think). After…
Jesus
  • 11
  • 2
0
votes
1 answer

Python - Get Contact from Phone Number

Using SL4A and Python, is there an easy way to get a Contact ID from a phone number? The phone number is from the 'address' field of an SMS. I am trying to avoid searching through all contacts. I use m = droid.smsGetMessageById(id, None).result…
Chris Read
  • 307
  • 4
  • 11
0
votes
2 answers

SL4A Python SMS Date Format

I am accessing my SMS messages with: ms=droid.smsGetMessages(False, 'inbox', ['date']).result The results are in the following format: [{u'date': u'1416143072400'}] How do I convert the date value to a readable format (dd/mm/yyyy)?
Chris Read
  • 307
  • 4
  • 11
0
votes
1 answer

python sl4a createDialogInput not working correctly with numbers

I made a little script to run in sl4a and I need to get a negative number. Using dialogCreateInput like follow, the keyboard in number mode is show, but the signals not work. Nor the buttons OK and Cancel are not show! How to make a negative number…
0
votes
2 answers

Taken photo is not saved

What device(s) are you experiencing the problem on? Sony Ericsson Arc S What firmware version are you running on the device? Android 4.4.4 What steps will reproduce the problem? My code: # -*- coding: utf-8 -*- import android droid =…
0
votes
2 answers

How Can I Write/Run Python On Galaxy Note 3? And What Is SL4A?

For reasons not understood by most, I'm trying to write/run python code on my Galaxy Note 3. So far, I've installed the apps: "QPython", "Script Launcher", and "Droid Edit". In QPython, whenever I run a script, it takes me to a terminal looking…
Jason T. Eyerly
  • 183
  • 1
  • 6
  • 18
0
votes
0 answers

Execute Python Script with Arguments in Android Application

I wish to execute a python script inside an Android app like we do on CLI like $python script.py arg1 I hope there is something like following to achieve what we are trying. something.execute("script.py arg1"); I have came across SL4A but cannot…
Ayush Goyal
  • 2,079
  • 8
  • 32
  • 47
0
votes
0 answers

SL4A wont run on G-Box Android box

sl4a installed successfully, installed also Python for Android. But i have an script that i can not run via sl4a. It opens sl4a and in scripts i can see py file when i press on it sl4a just exits. It does not show 5 buttons to run in terminal or…
0
votes
2 answers

SL4A Scripting on P.C

Is there a way to write Python scripts for SL4A (ASE) on P.C. and then deploy it on the hardware? I'm new to this and I could write the basic scripts on the device but writing long scripts on phone is tedious. Is there a support for that? Thanks in…
Ekta
  • 338
  • 2
  • 9
  • 26
0
votes
1 answer

Issue with WebCamFacade in SL4A

I'm having the same issue as this user. setParameters failed when initializing android webcam with python and SL4A I'm sure Paola G's response resolved the issue. My question is where does the updated WebCamFacade.java need to be placed? I'm sorry…
0
votes
3 answers

SL4A-Python: webViewShow displays simple HTML page, that doesn't disappear after script termination

I didn't seem to find any related answers, SL4A version is R6, Py4A is R5. It's really simple, the app calls webViewShow with a HTML page, it displays properly, the script terminates, but the page does not want to disappear. Can't reach menu, back…
0
votes
1 answer

Sending text messages with SL4A

I am trying to send a text every 10 seconds, but i don't know what is the problem. I apologize for the noob question, but I am a newbie and I could really use some help. Here's the code: import android, time from time import localtime droid =…