sl4a

Launch android app from SL4A script?

梦想与她 提交于 2019-11-30 21:31:06
I have the following in /sdcard/sl4a/scripts/twitter.py import android droid = android.Android() droid.launch('com.twitter.android') And if I run it in the console or the background, it immediately exits with code 1, and the log file is empty. If there are other ways to launch applications from some sort of script, I'm open to suggestions. I know of Tasker, but I'd rather write text scripts than use a wizard. you can use startActivity for that: import android droid = android.Android() droid.startActivity('android.intent.action.MAIN', None, None, None, False, 'com.twitter.android', 'com.twitter

Launch android app from SL4A script?

廉价感情. 提交于 2019-11-30 17:40:36
问题 I have the following in /sdcard/sl4a/scripts/twitter.py import android droid = android.Android() droid.launch('com.twitter.android') And if I run it in the console or the background, it immediately exits with code 1, and the log file is empty. If there are other ways to launch applications from some sort of script, I'm open to suggestions. I know of Tasker, but I'd rather write text scripts than use a wizard. 回答1: you can use startActivity for that: import android droid = android.Android()

Why doesn't Python hash function give the same values when run on Android implementation?

≡放荡痞女 提交于 2019-11-27 02:39:28
问题 I believed that hash() function works the same in all python interpreters. But it differs when I run it on my mobile using python for android. I get same hash value for hashing strings and numbers but when I hash built-in data types the hash value differs. PC Python Interpreter (Python 2.7.3) >>> hash(int) 31585118 >>> hash("hello sl4a") 1532079858 >>> hash(101) 101 Mobile Python Interpreter (Python 2.6.2) >>> hash(int) -2146549248 >>> hash("hello sl4a") 1532079858 >>> hash(101) 101 Can any