cannot register wp8 hybrid app to push notification

3 posts, 0 answers
  1. Cesar
    Cesar avatar
    2 posts
    Member since:
    Feb 2016

    Posted 08 Mar 2016 Link to this post


    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

    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. Cesar
    Cesar avatar
    2 posts
    Member since:
    Feb 2016

    Posted 08 Mar 2016 in reply to Cesar Link to this post

    I could not attach the zip of the project. just the screenshot:
  3. Anton Dobrev
    Anton Dobrev avatar
    607 posts

    Posted 10 Mar 2016 Link to this post

    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.

    Anton Dobrev
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
Back to Top