This is a migrated thread and some comments may be shown as answers.

cannot register wp8 hybrid app to push notification

2 Answers 57 Views
Push Notifications
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Cesar
Top achievements
Rank 1
Cesar asked on 08 Mar 2016, 02:26 PM
hi,

I'm having issues on registering my Lumia 925 (wp8) app for push notifications.

Step by step instructions on how to reproduce the problem:

1. using the web interface, I created a new app using the new app wizard, chose Advanced option, selected Hybrid and Javascript and selected "Telerik BaaS Push Notification" sample project;

2. once the editor opened, I clicked "Notifications" (left menu), then "Push Settings" then selected "Windows Phone" and hit the Save button

3. then I clicked Settings (left menu), and copied my app id "xxxxxxxxxxxxxxxxx"

4. I went to "Code", opened "/scripts/app/main.js" and replaced TELERIK_APP_ID on line 2 by my app id "xxxxxxxxxxxxxxxxx"

5. following the instructions on "Notifications > Push Notifications > Push Browser", I verified if the necessary plugins (step 2) were installed, and if the necessary javascript steps were followed (step 3). both were correct, and so I changed nothing

6. I went back to "Code" (left menu), hit Run > Build > Windows Phone / App package / Debug (I tried with Release option too)

7. I installed the app on my windows phone as I do normally and started the app.

8. I clicked the "Register for Push" button, and it never returns or changes. If I click it again, I get an alert: "REGISTER ERROR:
{'name'':'EverliveError','message':'Push notifications are currently
initializing'}"

am I missing something? or just misunderstood how the demo should work?

I also attached a screenshot and the exported zip file of my project.

thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Cesar
Top achievements
Rank 1
answered on 08 Mar 2016, 02:28 PM
I could not attach the zip of the project. just the screenshot:
0
Anton Dobrev
Telerik team
answered on 10 Mar 2016, 11:14 AM
Hi Cesar,

It appears that the steps you followed are correct and should produce the expected result. Same is confirmed by the project you attached in another support thread.

Unfortunately,  it is not clear what the possible cause for the problem might be. Allow me to try to identify it based on some further information.

When invoking the registration logic for push notification what happens behind the scenes is:


- native code tries to obtain push token from the platform vendor (the push service for Windows Phone)
- if obtained, the push token and the device parameters are sent to the Telerik Platform server

Because the above steps happen in the specified order, the registration in the backend will not happen before the push registration token is received.

The reason you are receiving the error that push notifications are currently initializing is that the application is awaiting for the native code to return from obtaining a push token from the vendor server. This token is required to ensure the communication between the sending server and the device.


Unfortunately, we cannot confirm the reason for the delay of the token being pushed to the device. This operation happens sometimes immediately, or may take a longer time, or may not finish at all. Because we have identified that such issues may be related to the Cordova version, network or to the vendor service, I suggested that you try:

  • A different Cordova version
  • Switching to the Windows 8.0 SDK in your project
  • A Windows 8.1 device or another Windows Phone device
  • A different network, some networks do not allow the push registration with the vendor
  • Sometimes Windows Phones do not receive immediately a push token from the vendor, it may be received subsequently, so it may be necessary to do not block the app UI with the push registration logic
  • Is the sample working for you for another device platform

I hope that this helps.

Regards,
Anton Dobrev
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
Tags
Push Notifications
Asked by
Cesar
Top achievements
Rank 1
Answers by
Cesar
Top achievements
Rank 1
Anton Dobrev
Telerik team
Share this question
or