Page 1 of 1

I am having trouble with the push notification service.

Posted: Tue Apr 01, 2014 2:24 am
by adam griffin

I am trying add an event upon the push notification being recieved. When a push notification is recieved I would like for the app to set an html component visible and add html code.

This is what i have upon the push notification event :

alert (data.aps.alert);

Appery("htmlLabel").show();
$('#htmlLabel').show();

Appery('htmlLabel').append('<!--<div class = "ticker-container" --');
Appery('htmlLabel').append('<!--<div class = "ticker-text" --');
Appery('htmlLabel').append(data.aps.alert);
//Appery('htmlLabel').append("HEY");
Appery('htmlLabel').append('<!--< --');
Appery('htmlLabel').append('<!--< --');

var width = $('.ticker-text').text().length;
var containerwidth = $('.ticker-container').width(),
left = containerwidth;
$(document).ready(function(e){

function tick() {

Code: Select all

     if(--left/1.5 < -width*2-150){ 
         left = containerwidth; 
     } 
     $(".ticker-text").css("margin-left", left + "px"); 
     setTimeout(tick, 16); 
   } 
   tick(); 

});


I am having trouble with the push notification service.

Posted: Tue Apr 01, 2014 2:26 am
by adam griffin

Without the html comments ofcourse


I am having trouble with the push notification service.

Posted: Tue Apr 01, 2014 6:41 am
by Nikita

Hello.

Specify your problem please. Did you follow this tutorial:

http://docs.appery.io/tutorials/sendi...


I am having trouble with the push notification service.

Posted: Tue Apr 01, 2014 6:50 am
by adam griffin

Yes, I follow the tutorial. I can receive the notification but the javascript that I want to execute when a notification is receive will not execute. Do you how to fix this?


I am having trouble with the push notification service.

Posted: Tue Apr 01, 2014 8:10 am
by Kateryna Grynko

Hi Adam,

Did you try a simple alert? What do you see in console?


I am having trouble with the push notification service.

Posted: Tue Apr 01, 2014 2:28 pm
by adam griffin

I haven't yet tried in console but I have tried on device. When I send a notification to device. The message is shown in status bar but when I click the notification from the status bar, the JS is not ran. I also added: alert ("hey"). Even this alert is not ran. Please help!


I am having trouble with the push notification service.

Posted: Tue Apr 01, 2014 9:38 pm
by adam griffin

Are you able to help me??


I am having trouble with the push notification service.

Posted: Tue Apr 01, 2014 10:28 pm
by Dirk Gissing

Adam, this is a bug within Appery. It's going to be fixed mid-April according to Appery employees.


I am having trouble with the push notification service.

Posted: Tue Apr 01, 2014 10:34 pm
by adam griffin

That sucks. Do you know of any workarounds?


I am having trouble with the push notification service.

Posted: Wed Apr 02, 2014 5:17 am
by Kateryna Grynko