sl4a

setParameters failed when initializing android webcam with python and SL4A

Deadly 提交于 2019-12-10 14:33:12
问题 I'm using the SL4A platform on an android 4.0 tablet and attempting to initialize a webcam stream using the droid.webcamStart() method found here: http://code.google.com/p/android-scripting/wiki/ApiReference#webcamStart my problem is when I execute the following code I get a setParameters failed error. The python code is simple: import android droid = android.Android() address = droid.webcamStart(100,80,0).result if all goes according to plan this should initialize a webcam preview stream but

Sl4A Selecting running application from notification window

谁都会走 提交于 2019-12-10 12:18:54
问题 I have a SL4A program I have written. I have one issue before i'm ready to publish it. For some reason when the app is running, if I home screen out of the app, I see it running in the notification area, but when I select it nothing happens. However if I click my icon from apps area it will bring the app back up. Any suggestions? 回答1: Notifications created by SL4A do nothing; they have no callback and can only alert users. Unfortunately there isn't really any way around this: BeanShell, JRuby

QPython development environment using mac or windows

流过昼夜 提交于 2019-12-10 11:06:38
问题 Being new to QPython, didn't find any reference about developing on a Mac or Pc, eventually deploying the code on the Android device. In contrast to developing the code itself on the Android device which seems very awkward specially for larger projects. I wish to write the code using a "normal" IDE such as IntelliJ using my Mac or Windows, eventually deploy it on an Android device, and execute with QPython. So the following questions come to mind: Best practice to transfer source code to an

Embedding Script Interpreter in Android app

ぃ、小莉子 提交于 2019-12-08 13:29:52
问题 I am trying to build an Android app which read a txt file written in Java syntax and compile it via other language. Skip java->script, I want to know how I can embed a script interpreter or something that would compile the script code. So the basic functionality is: read the script code, compile it, give the result. e.g. show a Hello World screen. I know there is "official" sl4a app, but I just want the compiling piece from it and embedded in my own app. Is it possible? Btw is there any

Can't create file with Perl script on Android (using perl-android-apk)

 ̄綄美尐妖づ 提交于 2019-12-08 02:52:05
问题 I want to run a simple Perl script on Android. I am using perl-android-apk which makes it possible to include the Perl interpreter in one APK (based on SL4A). The project comes with a hello.pl script, which shows a toast. Alright, everything working so far, so I added some lines for file creation - now whole hello.pl script looks like: use Android; my $a = Android->new(); $a->makeToast("Hello, Android!"); open(TEXT,">newtext.txt") || $a->makeToast("I died."); print TEXT "Check out our text

Is there a way to run SL4A script from a directory elsewhere?

一世执手 提交于 2019-12-07 10:37:55
问题 sl4a has all of its scripts under /sdcard/sl4a/scripts Is it possible to run a script that lives elsewhere: e.g. from /sdcard/dropbox/pyscripts [wink wink] 回答1: I think the answer is no at this moment in time. The app does not have a option to set that path. The only other idea I had was to create a symbolic link from the dropbox folder to the scripts dir. But this has a few major problems too, the biggest beeing that most SD-cards are formatted with FAT32, which simply does not support

QPython development environment using mac or windows

感情迁移 提交于 2019-12-06 05:54:06
Being new to QPython, didn't find any reference about developing on a Mac or Pc, eventually deploying the code on the Android device. In contrast to developing the code itself on the Android device which seems very awkward specially for larger projects. I wish to write the code using a "normal" IDE such as IntelliJ using my Mac or Windows, eventually deploy it on an Android device, and execute with QPython. So the following questions come to mind: Best practice to transfer source code to an Android device with QPython installed (not using the QR Code which is limited to few KB's of code) Is it

Can I sell my SL4A app on Android Market [closed]

若如初见. 提交于 2019-12-06 04:06:18
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I want to develop an application in Python for Android using SL4A and I want to know whether is possible to sell it as an application on Android Market. 回答1: I believe you should be able to after you have embedded your script into an APK. Take a look at this on the android-scripting wiki. 回答2: But this APK still

Is there a way to run SL4A script from a directory elsewhere?

半城伤御伤魂 提交于 2019-12-05 14:00:09
sl4a has all of its scripts under /sdcard/sl4a/scripts Is it possible to run a script that lives elsewhere: e.g. from /sdcard/dropbox/pyscripts [wink wink] I think the answer is no at this moment in time. The app does not have a option to set that path. The only other idea I had was to create a symbolic link from the dropbox folder to the scripts dir. But this has a few major problems too, the biggest beeing that most SD-cards are formatted with FAT32, which simply does not support symbolic links. If you have a different filesystem, you can try that path though. Not sure if root is required -

speech recognition reduce possible search results

廉价感情. 提交于 2019-12-05 02:34:19
问题 I have started with Speech recognition using android, sl4a and python and so far, it works fine. My user is just supposed to input numbers between 0 and 9 with his voice. Is there a way to tell android to only search in those number and therefore reduce the time of recognition (and probably errors) ? 回答1: No. You cannot change what google returns. You can only process the results. Fortunately, you can process the results to increase the chance of a match. For example, you could use a phonetic