telerik app builder integration

Comments

4 comments

  • Avatar
    Alexander Spotar

    Currently, we do not have a special SDK/plugin for Telerik App Builder, since it is a closed-source builder.

    However, the integration seems to be similar to PhoneGap Build Generic Plugin that Pushwoosh currently supports. Have you looked into Pushwoosh guide for PhoneGap Build Generic Plugin?

    You may also find this Working with Custom Plugins Telerik article helpful.

  • Avatar
    mobileznk

    Its just a phonegap build service actually but for some reason I cannot get to work, I get an "Cannot read property 'pushNotification' of undefined" on my console log and this comes up from the 'window.plugins' that is undefined.

    by the way I dont mind paying consulting services to pushwoosh to solve this for me.

    Cheers

  • Avatar
    mobileznk

    this is what I get http://prntscr.com/32gbbz

    and bellow is the code

    <!DOCTYPE html>
    

    <html> <head> <meta charset="UTF-8"/> <title>Nomisma</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="jquery-mobile/styles/jquery.mobile-1.3.1.min.css" rel="stylesheet"/> <link href="styles/main.css" rel="stylesheet"/> <link href="styles/custom-icons.css" rel="stylesheet"/>

        <script src="cordova.js" type="text/javascript"></script>
        <script type="text/javascript" src="PushNotification.js"></script>
        <script src="jquery-mobile/js/jquery-1.9.1.min.js" type="text/javascript"></script>
        <script src="jquery-mobile/js/jquery.mobile-1.3.2.min.js" type="text/javascript"></script>
        <script src="scripts/jFeed.js" type="text/javascript"></script>
        <script src="scripts/datef.js" type="text/javascript"></script>
        <script src="scripts/rssMain.js" type="text/javascript"></script>
    
        <script type="text/javascript" src="scripts/push.js"></script>
    </head>
    <body  onload="init();" >
    
        <!--Home-->
        <div id="page-home" class="bgc" data-role="page" data-theme="c" >
    
            <!--Header-->
            <div data-role="header"  data-theme="c"  data-position="fixed" data-fullscreen="false">
                <br />&nbsp;&nbsp;&nbsp;<img src="img/logo-mob.png"  />
            </div>
    
            <!--Content-->
            <div data-role="content" id="content" class="page-content" data-theme="c" >
    
                <div align="center">
                    <br />
                    <p>&nbsp;</p><br />
                    <img width="200" id="bannermain" height="200" src="http://staging.zenika.gr/RSSProxy/redirect/i-front/" />
                </div>
    
                <!--Footer-->
                <div id="page-location-footer" data-role="footer" data-position="fixed" class="ui-bar" >
                    <a href="" id="athema_link" data-icon="home" data-transition="slide"  data-theme="b" data-inline="true"  data-ajax="false"  >Είσοδος</a>&nbsp;
    
                </div>
    
            </div>
    
        </div>
    
        <script type="text/javascript">
    
            function init() {
               document.addEventListener("deviceready", initPushwoosh, true);
    
               //rest of the code
            }
    
            function initPushwoosh() {
                var pushNotification = window.plugins.pushNotification;
                pushNotification.onDeviceReady();
    
                pushNotification.registerDevice({ projectid:"XXXXXXXXX", appid : "YYYYYYYYY"},
                                                function(status) {
                                                    var pushToken = status;
                                                    console.warn('push token: ' + pushToken);
                                                },
                                                function(status) {
                                                    console.warn(JSON.stringify(['failed to register ', status]));
                                                }
                    );
    
                document.addEventListener('push-notification', function(event) {
                    var title = event.notification.title;
                    var userData = event.notification.userdata;
    
                    if (typeof(userData) != "undefined") {
                        console.warn('user data: ' + JSON.stringify(userData));
                    }
    
                    navigator.notification.alert(title);
                });
            }
    
    
    
    
    
            document.addEventListener('deviceready', function () {
                navigator.splashscreen.hide();
                onDeviceReady();
            }, false);
    
            function onDeviceReady() {
                //All pages at least 100% of viewport height
                var viewPortHeight = $(window).height();
                var headerHeight = $('div[data-role="header"]').height();
                var footerHeight = $('div[data-role="footer"]').height();
                var contentHeight = viewPortHeight - headerHeight - footerHeight;
    
                // Set all pages with class="page-content" to be at least contentHeight
                $('div[id="content"]').css({'min-height': contentHeight + 'px'});
            }
            $(document).on('pageinit', '[data-role=page]', function() {
                $("#bannermain").bind("load", function () {
                    $(this).fadeIn();
                });
    
                localStorage.clear();
                sessionStorage.clear();
    
                $(document).off("click", "#athema_link").on("click", "#athema_link" , function (event) {
                    //console.log("going to athema...");
                    $.mobile.showPageLoadingMsg("a", "Παρακαλώ Περιμένετε...");
                    parseAthema();
                    $(document).ajaxStop(function () {
                        window.location.href = "athema.html";
                    });
                }
                    );
            });
            $("img[class='ui-li-thumb']").load(function() {
                $(this).css('padding-top', ((80 - this.height) / 2));
                $(this).css('padding-left', 10);
                $("h2.ui-li-h").css('padding-top', ((50 - this.height) / 2));
            });
    
    
    
        </script>
    </body>
    

    </html>

  • Avatar
    ca-miro

    Thank you Alexander for your answer. However, there is one problem. In App Builder you don't have any OS specific files. This means you can't edit the App.xaml as shown in your WP8 guide:

    http://www.pushwoosh.com/programming-push-notification/windows-phone/wp-additional-platforms/windows-phone-cordova-sdk-integration-guide/.

    Is there a workaround?

Please sign in to leave a comment.