adam griffin
Posts: 0
Joined: Tue May 21, 2013 8:44 pm

I am having trouble with the push notification service.

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(); 

});

adam griffin
Posts: 0
Joined: Tue May 21, 2013 8:44 pm

I am having trouble with the push notification service.

Without the html comments ofcourse

Nikita
Posts: 0
Joined: Fri Feb 28, 2014 4:02 pm

I am having trouble with the push notification service.

Hello.

Specify your problem please. Did you follow this tutorial:

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

adam griffin
Posts: 0
Joined: Tue May 21, 2013 8:44 pm

I am having trouble with the push notification service.

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?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

I am having trouble with the push notification service.

Hi Adam,

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

adam griffin
Posts: 0
Joined: Tue May 21, 2013 8:44 pm

I am having trouble with the push notification service.

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!

adam griffin
Posts: 0
Joined: Tue May 21, 2013 8:44 pm

I am having trouble with the push notification service.

Are you able to help me??

Dirk Gissing
Posts: 0
Joined: Sat Oct 12, 2013 4:18 pm

I am having trouble with the push notification service.

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

adam griffin
Posts: 0
Joined: Tue May 21, 2013 8:44 pm

I am having trouble with the push notification service.

That sucks. Do you know of any workarounds?

Return to “Issues”