I have two questions regarding the sl4a scripting language. I'd like to develop a python script that will be periodically contacted by a server and post some information to the notification bar.
I've successfully add message to the notification bar, but
Thanks!
Officially, there is no API exposed to SL4A for customization of notifications which exist does exist in Android.
Reference:
http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomExpandedView
http://code.google.com/p/android-scripting/wiki/ApiReference
Officially, there is no API exposed to SL4a for firing an intent on user click from user. .
notify(
String title: title,
String message)
Notify, just displays a notification that will be canceled when the user clicks on it. Now, somehow if you can trace cancellation of this notification, you can start a new intent using your script.
Hack?
Please note, Android treats these notification from SL4A and not from your script. (due to which you are getting the SL4A icon) Thus, somehow it is possible to use all API which are exposed to a normal JAVA code, treating SL4A as an application but then this approach will make all your apps using SL4a have the same logo. ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With