feeback api crashes application in android device

2 posts, 0 answers
  1. Sairaj
    Sairaj avatar
    10 posts
    Member since:
    Feb 2015

    Posted 10 Aug 2015 Link to this post

    Hello,

    Recently I encountered an issue in Android device while accessing feedback api via shaking or on button click, a popup opens with feedback options, but when click on any one of them my application is crashed with an alert 'Unfortunately App stops working'. Its working perfectly fine before.
    I have tested sample app for feedback api in android and its working, I don't know what i am doing wrong in my app and why its crashing.
    Here's my code  -Recently I encountered an issue in Android device while accessing feedback api via shaking or on button click, a popup opens with feedback options, but when click on any one of them my application is crashed with an alert 'Unfortunately App stops working'. Its working perfectly fine before.
    I have tested sample app for feedback api in android and its working, I don't know what i am doing wrong in my app and why its crashing.
    Here's my code  -

    index.html

    <!DOCTYPE html>
    <html>
        <head>
            <title></title>
            <!-- <base href="http://demos.telerik.com/kendo-ui/dropdownlist/events">-->
            <!--<link href="kendo/styles/jquery-ui.min.css" rel="stylesheet" />-->
            <!--<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, target-densitydpi=device-dpi" />-->
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <meta name="format-detection" content="telephone=no" />
            <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
            <script src="cordova.js"></script>
            <link href="kendo/styles/kendo.mobile.all.min.css" rel="stylesheet" />
            <link href="kendo/styles/kendo.common.min.css" rel="stylesheet" />
            <link href="kendo/styles/kendo.default.min.css" rel="stylesheet" />
            <link href="styles/main.css" rel="stylesheet" />
            <link href="styles/login.css" rel="stylesheet" />
            <link href="styles/quiz_info.css" rel="stylesheet" />
            <link href="styles/quiz.css" rel="stylesheet" />
            <link href="styles/my_profile.css" rel="stylesheet" />
            <link href="styles/registration.css" rel="stylesheet" />
            <link href="styles/leaderboard.css" rel="stylesheet" />
             
            <script src="kendo/js/jquery.min.js"></script>
           <!-- <script src="kendo/js/jquery-ui.min.js"></script>-->
            <script src="kendo/js/kendo.all.min.js"></script>
            <script src="kendo/js/kendo.mobile.min.js"></script>
            <script type="text/javascript"  src="https://maps.googleapis.com/maps/api/js?sensor=true"></script>
            <script type="text/javascript"  src="scripts/jquery.countdownTimer.js"></script>
            <script type="text/javascript"  src="scripts/everlive.all.js"></script>
            <script type="text/javascript"  src="scripts/jsOAuth-1.3.6.min.js"></script>
            <script type="text/javascript"  src="scripts/app.js"></script>
            <script type="text/javascript"  src="scripts/app_properties.js"></script>
            <script type="text/javascript"  src="scripts/login.js"></script>
            <script type="text/javascript"  src="scripts/home.js"></script>
            <script type="text/javascript"  src="scripts/showquiz.js"></script>
            <script type="text/javascript"  src="scripts/my_history.js"></script>
            <script type="text/javascript"  src="scripts/my_profile.js"></script>
            <script type="text/javascript"  src="scripts/registration.js"></script>
            <script type="text/javascript"  src="scripts/geoLocation.js"></script>
            <script type="text/javascript"  src="scripts/leaderboard.js"></script>
            <script type="text/javascript"  src="scripts/EqatecMonitor.js"></script>
        </head>
      
        <body >
            <div data-role="layout" data-id="main">
                <div data-role="header" id="header">
                    <div data-role="navbar" id="navbar">
                        <span data-role="view-title"></span>
                         <a class="nav-button headerbackbtn" data-align="left" data-icon="backbtnicon" data-role="button" id="headerbackbtn" onclick="goBackToLogin()" style="display:none;"></a>
                        <a data-role="button" href="#appDrawer" data-rel="drawer" data-align="left" data-icon="drawer-button" id="drawerBtn"></a>
                        <!--buton for feedback -->
                        <a class="nav-button hidefeedbackbtn" data-align="right" data-role="button" onclick="sendFeedback()">Feedback</a>
                    </div>
                </div>
      
                <!-- application views will be rendered here -->
      
            </div>
      
            <!-- application drawer and contents -->
            <div data-role="drawer" id="appDrawer" data-title="Navigation" data-before-show="beforeShow" data-hide="onHide">
                  
                <ul data-role="listview" id="drawer-list">
                    <li>
                        <a onclick="confirmation('views/LeaderBoard.html')">
                            <img src="images/rewards.png" class="drawer_icons">ScoreBoard
                        </a>
                    </li>
                    <li>
                        <a onclick="confirmation('views/my_profile.html')">
                            <img src="images/myprofile.png" class="drawer_icons">My Profile
                        </a>
                    </li>
                    <li>
                        <a onclick="confirmation('views/home.html')">
                            <img src="images/selectquiz.png" class="drawer_icons">Home
                        </a>
                    </li>
                    <li>
                        <a onclick="confirmation('views/home.html')"><!--scoreCard-->
                            <img src="images/settings.png" class="drawer_icons">Rules
                        </a>
                    </li>
      
                    <li>
                        <a onclick="confirmation('logout')">
                            <img src="images/logout.png" class="drawer_icons">Logout
                        </a>
                    </li>
                </ul>
            </div>
        </body>
    </html>

     

     

    app.js in which I initialized feedback api

     

    (function (global) {
         
        var APPFEEDBACK_API_KEY = 'ea35ad70-f2bb-11e4-83ad-a764fd037f71';
         
          
        // this function is called by Cordova when the application is loaded by the device
        document.addEventListener('deviceready', function () {
             
            
            var feedbackOptions = {
                    enableShake: true
            };
            try {
                console.log("analytics");
                feedback.initialize(APPFEEDBACK_API_KEY, feedbackOptions);
                window.analytics.Start();
            }
            catch(err) {
                console.log('Something went wrong:');
                console.log(err);
            }
              
          navigator.splashscreen.hide();
           
      
          app = new kendo.mobile.Application(document.body, {
            // comment out the following line to get a UI which matches the look
            // and feel of the operating system
            skin: 'flat',
            // the application needs to know which view to load first
            initial: 'views/splash.html'
          });
            document.addEventListener("backbutton", onBackButton, true);
             
        }, false);
    })(window);
      
    function sendFeedback() {
          
        feedback.showFeedback();
    };

     

     

    Thanks & regards,

    Sairaj

  2. Serge
    Admin
    Serge avatar
    375 posts

    Posted 12 Aug 2015 Link to this post

    Hello Sairaj, 

    Unfortunately we don't have a solution right away. Have a look at this forum post

    Regards,
    Serge
    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
Back to Top