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

Execute Apple Push Notification Server (PHP) from Android Device using "PHP for Android"

I recently downloaded and installed "PHP for Android." I created a .php file that utilizes an SSL connection with port 2195. I followed a guide for writing a php server that sends push notifications to Apple's APNS, and SUCCESSfully ran it on my…
Noam
  • 3,100
  • 3
  • 16
  • 19
0
votes
1 answer

Sample python code for android: Login dialog with username and pasword

sl4a does come with a sample getPassword, but I want to see if I can get a simply popup login box that has both Login username and Password. I have been trying to search a lot for this but cannot find how to do this in python. Any help would be…
StanM
  • 827
  • 4
  • 12
  • 33
0
votes
1 answer

What do I need to get my phone app to connect to a https database?

I want to build an app that talks to a database. Analogy would be the youtube app for example. It connects to a secure host (requires login and password), and then returns to user results based on their query. What I need the app to do is: Get user…
StanM
  • 827
  • 4
  • 12
  • 33
0
votes
1 answer

Read call log from Android Python

I'm trying to compile Python code directly on my Android phone via QPython 3L and it's fine for some initial examples. Now I want to read the call log and here is my code. from androidhelper import sl4a droid = sl4a.Android() myconst =…
user11323942
0
votes
0 answers

ValueError: no json object could be decoded (Head First Python-chapter 8)

I'm new to python and I'm learning using Head First Python. I've gotten to chapter 8 and I'm stuck with the error message above. After writing the coachapp.py script given by the book and uploading it onto android emulator device, I'm stuck with…
0
votes
0 answers

Step by step guide to install SL4A in Android

I know that there are many questions like this, but most of those answers are outdated or just does not work. I have been trying to install SL4A and some interpreters like Rhino, Python. Since the SL4A project was moved from Goggle servers to…
Puspam
  • 2,137
  • 2
  • 12
  • 35
0
votes
1 answer

Open HTML file on Android with Python androidhelper / SL4A

using qpython (python2.x), from what i can see, the way to open a web browser on android from a python script is by first getting the "application uri?" by calling from androidhelper import Android droid = Android() …
user5721764
0
votes
3 answers

Sending a text using qpython

I have been trying to send a text message using sl4a in qpython Here is my code: import androidhelper droid = androidhelper.Android() droid.smsSend('phone number in here', 'message in here') When I run it, nothing happens Does anyone know why?
0
votes
1 answer

How to open an app on Droid via Python - SL4A Method?

I just recently decided to break into the mobile automation game, and stumbled upon SL4A via Python for Droid. I'm looking for a way to open an app on my Droid device via Python. I've heard that SL4A is a Python package that can hopefully do just…
wbhyatt
  • 43
  • 2
  • 5
  • 12
0
votes
1 answer

Change text of an android message

Recently I made a challenge for myself: make a clock using qpython3 on my android. The script was working fine when I "told" it to print the current time every second, however when I "told" it to make a notification, a lot of different notifications…
ArthurQ
  • 118
  • 1
  • 8
0
votes
1 answer

android "open with" not listing chrome

I have a short python program running on Android 6.0.1 (Nexus 7 tablet) It tells the OS to open up an html file. Unfortunately, when I get the "Open with" dialog box, Chrome is not one of the options. If I pick Firefox, everything works, but I…
0
votes
1 answer

I'm writing a SL4A script in QPython to mark unread SMS of inbox as read. and this is not working in Marshmallow

I want to write an SL4A script to mark Unread SMS of inbox as Read. I want to run this script in QPython android application. ​import androidhelper as android droid = android.Android() ids = droid.smsGetMessageIds(True).result print type(ids) print…
0
votes
1 answer

Python SL4A in other Language than English

I am trying to write a small script which can speak in my own language. import sl4a SpeakMe = sl4a.Android() mesaj = SpeakMe.dialogGetInput('What would you want me to say ?') SpeakMe.ttsSpeak(mesaj) when I run this code in my android it opens a…
melic
  • 266
  • 2
  • 15
0
votes
1 answer

Launch android app from python script?

I have the following in /sdcard/sl4a/scripts/imo.py import android droid = android.Android() droid.launch('com.imo.android.imoim') And if I run it , it immediately exits. If there are other ways to launch applications from some sort of script, I'm…
user8177349
  • 1
  • 1
  • 2
0
votes
1 answer

Android Emulator Keyboard

I'm using the Android 2.2 SDK emulator to test out the Scripting Layer for Android and have one annoyance. When you launch a Python interpreter and start to type code it appears that the parentheses key isn't mapped properly. When I hit the key on…