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

Is there a way to use pyjnius in sl4a

Hey guys is there any way of using pyjnius with sl4a? By that I mean importing pyjnius and using it in a python sl4a script... The goal is to be able to access the Google Play Services’ Activity Recognition client from an sl4a script. Any other way…
user1368891
  • 131
  • 2
  • 9
0
votes
1 answer

How to Run Python program on Android?

I am new to android and i want to run simple webpage load test on my android device using python. I have written a python to calculate the load time for each given webpage. i want to execute this on my android device for default browser and not on…
0
votes
1 answer

How do I get past init error with tweepy on sl4a?

When I run the sample script from tweepy on sl4a I get the following init error: TypeError: init() takes at least 4 arguments (3 given) I have put in my key, token and secrets.
bard3189
  • 21
  • 6
0
votes
1 answer

Is there any command in api reference for python about nfc

I am working on android, i am new to it. i tried all facades in the api reference of android-python. there are commands for bluetooth,wifi,camera.But, there is no command for nfc to check whether it is on or off or anything. i want to know is there…
Krish gopi
  • 155
  • 4
  • 12
0
votes
0 answers

Sl4a - eventRegisterForBroadcast - CALL_STATE_RINGING

I register a listerner for a CALL_STATE_RINGING broadcast signal. i open up a socket to read for events postet. when you run this command in this line (f.readline()), the Console depends on. i don't know, what i do wrong? import android import…
0
votes
1 answer

sl4a, problems with reading (bluetooth)

I am trying to write a script, which will connect a device (radiomodem), that have a bluetooth with my Nexus 7 (Android 4.4) The task is to send a command via bluetooth, and then get an answer from radiomodem. After sending a command I don't get an…
astridsnus
  • 31
  • 1
  • 6
0
votes
2 answers

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,…
motoku
  • 1,571
  • 1
  • 21
  • 49
0
votes
1 answer

Python programming from my phone?

I have searched to the point of confusion, so I need some guidance. I want to make a game on Android with Python - ONLY using my android device. I'm confused in the difference between Kivy and Sl4a and what steps i need to take in order to be able…
0
votes
2 answers

urlopen error [errno 111] connection refused

I am doing python exercise with a book 'headfirst python' and making android app by using python and sl4a my code is import android import json import time from urllib import urlencode from urllib2 import urlopen hello_msg = "Welcome to Coach…
Ui-Gyun Jeong
  • 143
  • 1
  • 4
  • 14
0
votes
2 answers

What kind of problems might one encounter if one runs SL4A continuously?

I have a small script, that functions as a broadcast receiver, and which I have programmed in Python (the script hands off processing to another main Python program). I don't know Java. In order for the receiver to function, however, SL4A…
ShankarG
  • 1,105
  • 11
  • 26
0
votes
1 answer

Pass variables to Zooper widget using an intent

So I have been sending variables from my python scripts to the minimalistictext widget for a while using the Local intent. This is my code from a previous question: import android droid = android.Android() activity =…
JimyKK
  • 48
  • 8
0
votes
1 answer

Access call log from SL4A

Is it possible to access the call log (history of outgoing, incoming and missed calls) of an android phone using a python code in the SL4A environment?
my account_ram
  • 325
  • 3
  • 11
0
votes
0 answers

SL4A app works using adb not apk

I have a simple scrip which opens a webpage. It works fine while using the adb start command; however, it seems to crash and exit when you attempt to implement using the apk. The app starts but after a button is pressed, it closes. Nothing happens.…
branch.lizard
  • 595
  • 1
  • 5
  • 15
0
votes
1 answer

Turn camera flash LED on/off with SL4A Python

How can I turn the camera LED on and off with sl4a Python? Maximum intensity is ok. Anything in android.* ? Here's the code: import sys def toggle_LED(action="on"): if action == 'on': with open('/sys/class/leds/torch-flash/flash_light',…
belteshazzar
  • 2,163
  • 2
  • 21
  • 30
0
votes
2 answers

Sl4A crashes on every script

There was time, when SL4A worked fine on my ICS phone (rooted, ofk). Than a factory reset happend; after it everything works just fine, except problem with SL4A. I install SL4A; it can run shell scripts. Than I install Python for Android or Perl for…
Kriattiffer
  • 617
  • 2
  • 8
  • 20