onNewNotification Implementation

24 views
Skip to first unread message

mso797

unread,
May 23, 2015, 8:48:12 AM5/23/15
to proto...@googlegroups.com
device.onNewNotification();

how do you implement this line of code in protocoder?

thanks alot
Swaleh

Víctor Díaz

unread,
May 24, 2015, 2:52:49 PM5/24/15
to mso797, proto...@googlegroups.com
Hello Swaleh,

For this function you need Android 4.4 or grater and then enable Protocoder as a custom notification receiver in your Android device settings.

Once you got this then write in your code

device.onNewNotification(function(package, title, text) {
  console.log(package, title, text);
});

I hope it answers your question

Cheers

Victor



----------------------------

Victor Diaz Barrales 
Life researcher / sometimes coder / professional nomad

--
You received this message because you are subscribed to the Google Groups "Protocoder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protocoder+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mso797

unread,
May 24, 2015, 6:31:23 PM5/24/15
to proto...@googlegroups.com, swaleh...@gmail.com
ahh, that clears things up.
 
Does the .onSmsReceived() function also require android 4.4

thanks alot
Swaleh 
Reply all
Reply to author
Forward
0 new messages