Results 1 to 4 of 4

Thread: Sencha touch Android push notification with phonegap

  1. #1
    Sencha User
    Join Date
    May 2013
    Posts
    37
    Answers
    3

    Default Sencha touch Android push notification with phonegap

    I am developing a sencha touch application which need push notification functionality. I know according to sencha docs they are not supporting Android push notification. So am trying to integrate my project with Phonegap 3.0. For push notification am using this pluginhttps://github.com/hollyschinsky/Pus...ationSample30/
    The demo is working fine am getting registration id, i can sent push notification to that reg id. But the problem is when i try to integrate my sencha app to this demo push plugin am not getting the reg id
    my index.html look like this way

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>crmapp</title>
    <script id="microloader" type="text/javascript" src="touch/microloader/development.js"></script>
    <script type="text/javascript" src="phonegap.js"></script>
    <script type="text/javascript" src="PushNotification.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
    </head>
    <body>
    <div id="appLoadingIndicator">
    <div></div>
    <div></div>
    <div></div>
    </div>
    </body>
    </html>

    And am calling the push notification function in js/index.js file from my app.js file its looks like this way



    Ext.application({
    name: 'WinReo',
    requires: [
    'Ext.MessageBox',

    ],




    views: [
    'Login',
    // 'MainMenu',
    'CrmFooter',
    'CrmHead',






    ],
    controllers:[
    'Login',
    'Main',
    'Task',

    ],
    models: [
    'Event',
    "Task"
    ],
    stores: [
    'Events',
    'EventsDueListStore'
    //'Contactsstore'
    ],




    icon: {
    '57': 'resources/icons/Icon.png',
    '72': 'resources/icons/Icon~ipad.png',
    '114': 'resources/icons/[email protected]',
    '144': 'resources/icons/[email protected]'
    },


    isIconPrecomposed: true,


    startupImage: {
    '320x460': 'resources/startup/320x460.jpg',
    '640x920': 'resources/startup/640x920.png',
    '768x1004': 'resources/startup/768x1004.png',
    '748x1024': 'resources/startup/748x1024.png',
    '1536x2008': 'resources/startup/1536x2008.png',
    '1496x2048': 'resources/startup/1496x2048.png'
    },


    launch: function() {


    Ext.fly('appLoadingIndicator').destroy();
    app.initialize(); // Please see this line


    },
    onUpdated: function() {
    Ext.Msg.confirm(
    "Application Update",
    "This application has just successfully been updated to the latest version. Reload now?",
    function(buttonId) {
    if (buttonId === 'yes') {
    window.location.reload();
    }
    }
    );
    }
    });




    Am not sure is it the way to call this function, am not getting access to that function at all, not getting registration id.. Please guid me in right direction.. is it the way to call phonegap function from sencha touch ? Am struck with issue, Please help me solve this issue, Thanks ..

  2. #2
    Sencha - Support Team keckeroo's Avatar
    Join Date
    Mar 2008
    Location
    Winnipeg, Canada
    Posts
    388
    Answers
    13

    Default

    I'm not quite sure where 'app.initialize()' comes from (presumably from one of your src includes ?) The ordering of your includes should be arranged so that your src javascripts are included before our microloader. This ensures that these files have been loaded and ready before your Touch application is loaded and the launch method fired.

    Kevin

  3. #3
    Sencha User
    Join Date
    Apr 2014
    Posts
    5

    Default

    did you get and this ans I want to translate also the code here
    http://devgirl.org/2013/07/17/tutori...p-application/

    regards

  4. #4
    Sencha Premium Member u25771's Avatar
    Join Date
    Sep 2012
    Location
    Switzerland :)
    Posts
    253
    Answers
    27

    Default

    Take a look at this tutorial with GameThrive. Might help.

    http://abitofcoding.blogspot.ch/2014...thrivecom.html
    Mark thread as answered if your problem could be solved and leave a vote for helpful answers

    For more help check out my new blog: http://abitofcoding.blogspot.com

    T
    o get in contact with me just send me a message on Google+

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •