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

Connect to an AP using Python and SL4A on Android

I need to connect to a WiFi access point on android using Python script and SL4A. I looked at SL4A's documentation http://www.mithril.com.au/android/doc/WifiFacade.html but there is not function for connecting to and authenticating for a given AP.…
flintlock
  • 97
  • 7
0
votes
1 answer

sl4a dialogCreateDatePicker()

How can I close dialogCreateDatePicker()? After using button screen is inactive and black. My example: import sl4a droid = sl4a.Android() droid.dialogCreateDatePicker() droid.dialogShow()
jasan
  • 209
  • 4
  • 15
0
votes
1 answer

sl4a startActivity find out packagename and classname

So I'm trying to start WhatsApp with a predefined message in sl4a using Python. This is my code: import android droid = android.Android() droid.startActivity("android.intent.action.SEND", None, "text/plain", …
alexm
  • 21
  • 4
0
votes
1 answer

Does the timeout parameter in Python's sqlite3 module affect the speed of normal transactions?

I am running a Python script on an Android phone using SL4A (sadly now basically dead). SL4A provides Python 2.6. This script (along with some other processes) accesses an sqlite database using Python's built in sqlite3 module. As it is running on…
ShankarG
  • 1,105
  • 11
  • 26
0
votes
1 answer

web app with qpython an SL4A in android

I am new to python on android and I am trying to buid the small example of a web application found here ( http://pythoncentral.io/python-for-android-using-webviews-sl4a/ ) where a python script opens a web page and communicates with it (you enter a…
val
  • 1
  • 1
0
votes
0 answers

Delete SMS on sent folder with python on Android

i've read this and this in order to make this script import sl4a droid = sl4a.Android() msgs = droid.smsGetMessageIds(False, 'sent')[1] msgs.extend(droid.smsGetMessageIds(False,'sent')[1]) print(droid.smsGetMessageById(msgs[0],…
linuxer
  • 161
  • 1
  • 9
0
votes
1 answer

SL4A client Python server

Summary I want a Bluetooth connection between an Android Phone as client and Python as server. Please help me I can't figure it out. Server side must be on PC with Python. I need Python code as server and Sl4A can connect to this PC. I tried a lot…
TeyteyLan
  • 197
  • 1
  • 3
  • 13
0
votes
1 answer

sl4a python communicate with pc over wifi

I want to collect accelerometer data on my android phone and communicate it to my laptop over wifi. A py script collects data on the phone with python for sl4a and another py script recieves data on the laptop. Both devices are on the same wifi…
torels
  • 141
  • 1
  • 4
0
votes
3 answers

How to install SL4A on emulated android phone

i'm currently reading through head first python and upon reaching chapter 8 I got stuck. The book wants me to download SL4A from the link http://code.google.com/p.android-scripting however that link no longer works. So I did some searching and…
0
votes
2 answers

SL4A + Intents + Jquery + Webview

I am writing sl4a android app utilizing webviews. I am trying to achieve a call from the webview to an event handler in my python script that launches an intent to pick an image from the image gallery and send back an image path to the webview so it…
michael g
  • 603
  • 7
  • 14
0
votes
3 answers

SL4A Qpython error

I've tried to use Qpython and everything seemed to be fine. But later, when I started script with lines import androidhelper droid = androidhelper.Android() It gave me error socket.gaierror: [Errno 4] non-recoverable failure in name…
desu
  • 455
  • 2
  • 18
0
votes
1 answer

SL4A - Serving up webview to bottle

I am prototyping an android app with bottle and sl4a. Running into some trouble with some code. I am using multiprocessing to set a 5 second delay on a function that opens up a webview to the localhost so when i run the server it has time to setup…
michael g
  • 603
  • 7
  • 14
0
votes
1 answer

Can we autoclose SL4A terminal, after script execution ends

When a script ends, SL4A terminal takes over and flashes: "Process has expired. Close terminal?", prompting me (user) to say Yes / No. Is there someway that the SL4A terminal dialog can be suppressed, so that after the script execution is…
bdutta74
  • 2,798
  • 3
  • 31
  • 54
0
votes
0 answers

Using SL4a to make intent that adds new contact

I need to construct a meaningful intent in python to add a new contact i.e name, phone-number-cell, phone-number-work, email. So far i have the following template i have been trying to follow and modify but it doesn't work. I don't expect the…
Edwinner
  • 2,458
  • 1
  • 22
  • 33
0
votes
2 answers

How do I use gdata and save a file on QPython for android?

I am in the process of migrating my scripts from python SL4A to QPython (can't get SL4A to work on android lollipop). I can't save a file to the disk So I am using: with open("foo.txt" ,"a") as f: f.write(theInfo) And I get IOError: [Errno…
user850498
  • 717
  • 1
  • 9
  • 22