$ cd YOUR_APP_ROOT
$ git submodule add https://github.com/oke-ya/CCLocalNotification.git Vendor/CCLocalNotification
- choose source tree root -> TARGET YOUR_APP-mobile -> Build Settings
- Add 'Header' into search field.
- Add '$(SRCROOT)/../Vendor/CCLocalNotification/Classes' into 'Heade Search Paths'.
- choose source tree root -> TARGET YOUR_APP-mobile -> Build Phases -> Link Binary With Libraries
- Add 'libCCLocalNotification.a'
include ':libcocos2dx'
project(':libcocos2dx').projectDir = new File(settingsDir, '../cocos2d/cocos/platform/android/libcocos2dx')
include 'local_notification'
project(':local_notification').projectDir = new File(settingsDir, '../Vendor/CCLocalNotification/proj.android')
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libcocos2dx')
compile project(':local_notification')
}
LOCAL_SRC_FILES := hellocpp/main.cpp
LOCAL_SRC_FILES += $(shell find $(LOCAL_PATH)/../../../Vendor/CCLocalNotification/Classes -name *.cpp)
LOCAL_SRC_FILES += $(shell find $(LOCAL_PATH)/../../../Vendor/CCLocalNotification/proj.android -name *.cpp)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../../Vendor/CCLocalNotification/Classes
<receiver android:name="com.oke_ya.cc_local_notification.LocalNotificationReceiver" android:process=":remote" />
</application>
<uses-permission android:name="android.permission.GET_TASKS" />
You should add ic_notice.png
for android.
#include "CCLocalNotification.h"
...
auto localNotification = LocalNotification::getInstance();
localnotification->setEnabled(true);
localnotification->isEnabled();
localnotification->setSchedule(60, "Take 60 sec.");