damonkohler / sl4a

SL4A brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreters directly on the Android device.
Apache License 2.0
2.44k stars 800 forks source link

Handle notification taps/cancellation #283

Open damonkohler opened 9 years ago

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:24

Currently in python we can do:
droid.notify("text 1", "text 2", "text 3")
to create a notification.  But nothing happens if you click on it.

I would love to be able to do something like
droid.notify(text 1", "text 2", "text 3", "android.intent.action.VIEW", 
"http://www.google.com")

and have an intent be fired off when the notification is clicked on by the 
user, just as if we had executed 
droid.startActivity("android.intent.action.VIEW", "http://www.google.com").

Maybe this is not the right way of handling the intents... I don't know.  I 
would also be happy if Intent were wrapped as a python class/module so 
that we could create one that way and attach it to a notification somehow.

Original issue reported on code.google.com by jenna.in...@gmail.com on 11 Dec 2009 at 5:25

Copied from original issue: damonkohler/android-scripting#151

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:24

I'm not sure exactly how this will work out, but something like that should be 
possible.

Original comment by damonkoh...@gmail.com on 16 Dec 2009 at 8:22

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:24

I see two possibilities (both of which could/should be implemented):

  * Store pending intents that can trigger scripts.
  * Generate an event that a running script could detect.

Original comment by damonkoh...@gmail.com on 1 Mar 2010 at 12:58