sl4a

Is SL4A Project Active?

|▌冷眼眸甩不掉的悲伤 提交于 2020-04-30 07:48:17
问题 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 2012. https://code.google.com/p/android-scripting/downloads/list 回答1: Yes, numerous people have forked the project and are maintaining on github. https://github.com/kuri65536/sl4a https://github.com/ainsophical/DROID_PYTHON 回答2: Look at the Qpython app on the

Sl4A Broadcasting an Intent to Minimalistic text widget

≡放荡痞女 提交于 2020-01-03 02:12:41
问题 I have been attempting to send variable data directly from SL4A to Minimalistic Text Widget using sendBroadcastIntent much like how I can send variables to Tasker (Using code I found on the SL4A google groups) Unfortunately my understanding of intents is a little lax and I have found locating tutorials specifically in relation to SL4A almost impossible. The SL4A makeintent API Reference The minimalistic Test Intent example The code I have attempted to use: import Android droid = Android()

How can I package the whole python interpreter in an Android APK?

余生长醉 提交于 2020-01-01 04:55:08
问题 I know about SL4A and how I can run Python scripts in Android. I need to know how I can package the whole Python interpreter inside my APK so my end-users won't have to download and install SL4A before running my App. Thanks. 回答1: Try looking at kivy.org. It's a python on android based Multitouch GUI,inside the documentation is explained how to create a package with all inside to publish on Android shop. I also remember that there was a chapter on the book Pro Android Python with SL4A

How to install interpreter for SL4A in offline

最后都变了- 提交于 2019-12-25 08:59:55
问题 I'm really interested in android scripting on perl/python/lua at my current job, but I'm also very limited in traffic consumption and I may need frequently repeat interpreters install procedure after reflashing android devices. So is there any way to install interpreters in SL4A using prepared files/archives without internet connection? 回答1: For installing Py4a, I ended up modifying android/PythonForAndroid/src/com/googlecode/pythonforandroid/PythonDescriptor.java , changing BASE_URL there

how to resove smsSend() error in sl4a python

依然范特西╮ 提交于 2019-12-25 07:48:50
问题 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 = droid.smsSend(number, message) it is working on android AVD but not in Android Phone...? 来源: https://stackoverflow.com/questions/27998075/how-to-resove-smssend-error-in-sl4a-python

How to execute Python script from Java code in Android

℡╲_俬逩灬. 提交于 2019-12-23 10:53:27
问题 I'm trying to make an standard Android application execute a python script that could return values to Java, but I'm facing a lot of issues. Jython doesnt support this in the Android environment, SL4A is a dead project, Kivi seems to be an full stack framework that do not use Java at all and QPython is SL4A that works on Android 5+ but almost don't have documentation. I wanted something like: // From INSIDE my Java Code new PythonEngine().execute('a = 1 + 1').getInt('a') With QPython I found

File dialog in python sl4a

↘锁芯ラ 提交于 2019-12-23 01:52:50
问题 I am looking for an simple file chooser dialog in sl4a . I have found a few native dialogs here but did not find the one I was looking for. I wish I could save time by finding something readily available. A minimal code like filename = fileopendialog() would be a bonus. Any ideas ? 回答1: I decided to write my own (see below for reference). This could probably be made better, any suggestions welcome. import android, os, time droid = android.Android() # Specify root directory and make sure it

Python for Android APK without dependencies

匆匆过客 提交于 2019-12-13 12:15:27
问题 Is it possible to build an APK using Python for Android that doesn't need Python for Android to be there, i.e. it includes Python? If so, how? 回答1: I believe this is what you are looking for: https://code.google.com/p/android-python27/ This will embed python into your apk. On first launch it will give you a dialog stating it is "installing". This part will install your script along with an integrated version of python. You are also able to embed different versions of python if you have a

Creating an android service to run in the background using python

感情迁移 提交于 2019-12-11 13:19:32
问题 I would like to know if it is possible to run an android service in the background (and possibly on boot) without rooting the device, using python and sl4a and if so how would i go about doing that. 回答1: For running a service in background or on boot you have to define a Broadcast Receiver which will basically start the service. Please refer code snippets mentioned in the answer of below question. Android BroadcastReceiver on startup - keep running when Activity is in Background I have seen