Cocos2d-x Notifications

  • Sonar Systems admin
    Likes 0

    Problem Description

    It's finally here, the plugin for our Cocos Helper allowing you to use Notifications.

    ATM the Helper has iOS C++ and JavaScript local notifications with Android coming soon.

    Solution Description

    Firstly setup Cocos Helper using one of the following links:

     - C++ - http://bit.ly/1GLOKxM
     - JavaScript - http://bit.ly/1Kia9Qn


    Once your setup, using push notification is ridiculously easy with just a single line of code

    **C++**
    SonarCocosHelper::Notifications::scheduleLocalNotification( delay, text to display );
    e.g.
    SonarCocosHelper::Notifications::scheduleLocalNotification( 5.0, "You now have a new life" );

    **JavaScript**
    SonarCocosHelper.Notifications.scheduleLocalNotification( delay, text to display );
    e.g.
    SonarCocosHelper.Notifications.scheduleLocalNotification( 5.0, "You now have a new life" );

    *Delay* - is how long after the local notification is shown
    *Text to display* - the text that the notification displays to the user

Login to reply