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

PushNotifications

4 Answers 79 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ganesh
Top achievements
Rank 1
Ganesh asked on 13 Oct 2015, 09:24 AM
 I want to implement push notification in telerik without BackEnd Services(Telerik Hybrid project) and send notification from my Rest services.Does telerik support  Push notification without its backend Services.and i need push token or device token to send it to server.if it is possible refer me some sample application

4 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 16 Oct 2015, 08:51 AM
Hi Ganesh,

You can implement a push notifications service yourself and use it in AppBuilder. This article describes the main steps you need to follow to implement such a service in general:
How Push Notifications Work

You can use third party push notification service providers or write a service of your own that does the entire job. However, writing the service yourself takes a lot of work and research, so you should consider if you really prefer to do it this way.

Keep in mind, that if you only want to trigger the notification from your code and don't want to write the entire infrastructure yourself, it is still possible to use Backend Services push notifications from your code:
Sending and Targeting Push Notifications (JS SDK)
You can find the same information targeting other programming languages by browsing the docs by language:
Backend Services docs by platform and language

Regards,
Tsvetina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ganesh
Top achievements
Rank 1
answered on 16 Oct 2015, 12:42 PM

Hi Tsvetina ,

Thanks for your information.Actually i need APN Token(Push token or device token) for that i am followed this blog

http://www.telerik.com/blogs/push-notifications-with-cordova-icenium

i writen this Code in device ready event  

 

 var apnSuccessfulRegistration = function(token) {
        alert("Successfully got a token:" + token);
    }

    var apnFailedRegistration = function(error) {
        alert("Error: " + error.toString());
    }
    
     var onNotificationAPN = function (event) {
        alert("on notification apn");
    }

    var deviceReady = function () {
         var pushNotification = window.plugins.pushNotification;
        try {
                if (device.platform == "iOS") {
                    pushNotification.register(apnSuccessfulRegistration, apnFailedRegistration,{
                        "badge": "true",
                        "sound": "true",
                        "alert": "true",
                        "ecb": "onNotificationAPN"
                    });
                } else {

                }
        } catch (err) {
            alert("from error blog");
        }​

 

I am getting the notification message .But callback is never fired either success or failure..I didn't get token.

what Certificates needed either development or distribution provisional profiles and what certificates exactly needed in Cryptographic Identities. to get the device token.Could you please suggest me where i am wrong.

Regards,

Ganesh

0
Tsvetina
Telerik team
answered on 21 Oct 2015, 10:37 AM
Hello Ganesh,

You can check whether the success and error callback functions are available to the global scope to ensure that they can be called. You can temporarily replace them with function definitions inside the register call and see if these functions are called:

pushNotification.register(function() {alert("success")}, function() {alert("error")},{
                        "badge": "true",
                        "sound": "true",
                        "alert": "true",
                        "ecb": "onNotificationAPN"
                    });

Additionally, you can review the push plugin documentation to check for any specifics introduced since this blog post was created, as it is quite old. 

As for iOS provisioning, you can see more information about their provisioning requirements in their documentation here:
Development and Production Environments


Regards,
Tsvetina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ganesh
Top achievements
Rank 1
answered on 23 Oct 2015, 12:08 PM
Hi Tsvetina ,
Thanks for your information.
Tags
General Discussions
Asked by
Ganesh
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Ganesh
Top achievements
Rank 1
Share this question
or