asl.notify via push notifications

R Ricardo Gonzalez 3 years 7 months ago
21 0 0

Good day Zebra team.
 
I'm trying to bubble a message direct to Notifications on SB1 (even when locked).I've sucessfully implemented it performing a subscriptor on push Event which does the asl.notify:
 
push.detected = 'detected(%s, %s)';
function detected(p1, p2){
alert(p1 + '|' + p2);
asl.notify('application', 'normal', 'Message',
'You received a message, what do you want to do?',
['Read', 'Dismiss'],
['http://127.0.0.1:83/UserDrive/apps/Push/index.html ']        
);
 
But it only works when the application is open, which is not suitable on this case.
I've tried to use the login, badge or the lock page, but none of them works as a subscribers (perhaps because s they are not on apps.json?):
 
http://192.168.43.76:8080/push?appName=login&message=TheMessage
http://192.168.43.76:8080/push?appName=lock&message=Message
http://192.168.43.76:8080/push?appName=badge&message=Message
 
Is there a way to use one of the above as subscriber for push events or subscribe an execution context like the common (apps.json) application or specific appNames?
 
Thanks in advance.
Ricardo

CONTACT
Can’t find what you’re looking for?