-
mihir77Likes 0Problem Description
Hi,
Thanks for the local notification, wanted it from a long time..
i am using it like this.
SonarCocosHelper::Notifications::scheduleLocalNotification(2.0, "You now have a new life","aaaaaa",1.0 );
but i am getting error on:-
NSDictionary * infoDict = [NSDictionary dictionaryWithObject:notificationTag forKey:@"notificationID"];
EXC_BAD_ACCESS
how to solve it? When will you launch local notification on android, as i want to launch the app in a week, or is there a way to execute local notification in android?
-
Sonar Systems adminLikes 0
What iOS version are you using.
-
mihir77Likes 0
ios version 8.4. i am running on simulator and cocos2d-x 3.4
-
Sonar Systems adminLikes 0
Try the latest version of Cocos2d-x
-
mihir77Likes 0
ok, should i install v3.8?
and is there a way to execute local notification for android, untill you launch for android..
-
Sonar Systems adminLikes 0
Local notifcations aren’t implemented into the Cocos Helper yet but will be soon.
-
mihir77Likes 0
I updated my project to cocos2d-x 3.8.1 for local notifications, but it is still giving the same error..
NSDictionary * infoDict = [NSDictionary dictionaryWithObject:notificationTag forKey:@"notificationID"]; // EXC_BAD_ACCESS
My code is :
SonarCocosHelper::Notifications::scheduleLocalNotification(1.0, "Hello", "Hello", 1);
The format specifed in cocos forum is not right, there are more parameters to it, it would be great to update it for other developers..
http://discuss.cocos2d-x.org/t/notifications-tutorial/23086
Please help..
This reply has been verified.
-
Sonar Systems adminLikes 0
What version of the helper are you using?
-
mihir77Likes 0
I am using Cocos Helper v1.46.00.
-
Sonar Systems adminLikes 0
Have you setup the Helper?
-
mihir77Likes 0
I setup once again, the BAD_ACCESS error is gone, but i didn’t got any notification.
Can you tell what is the first parameter – delay mean.
SonarCocosHelper::Notifications::scheduleLocalNotification(1.0, "Hello", "Hello", 1);
After the user registers i want to show local notification once in a day. And how can i send local notification the moment xcode emulator runs for testing purpose.
Thank you..
-
mihir77Likes 0
Can you please check it out;.
Awaiting your reply.
-
Sonar Systems adminLikes 0
Delay is how long until the notification shows, try setting it to 30 seconds and closing down the app but keeping the simulator open as the notification doesn’t appear whilst the simulator is open.
This reply has been verified.
-
mihir77Likes 0
I already tired it but its not showing the notification.
I tried all possible delays –
SonarCocosHelper::Notifications::scheduleLocalNotification(0.1, "asdfasdf", "awfwerewr", 1);
SonarCocosHelper::Notifications::scheduleLocalNotification(0.01, "asdfasdf", "awfwerewr", 1);
SonarCocosHelper::Notifications::scheduleLocalNotification(0.001, "asdfasdf", "awfwerewr", 1);
Is delay 1.0 means 1 hour? how to specify 30 seconds?
I setitup like this:-
I imported sonarframeworks
did SonarCocosHelper::IOS::Setup(); and made local notification true in schsettings.h.
Is there anything more?
-
Sonar Systems adminLikes 0
No its in seconds so do 30
-
mihir77Likes 0
I just created a new project and i setup the cocos helper
i am doing
SonarCocosHelper::Notifications::scheduleLocalNotification(30.0, "hhh","aaa",1233);
but it is still giving error – EXC_BAD_ACCESS on
NSDictionary * infoDict = [NSDictionary dictionaryWithObject:notificationTag forKey:@"notificationID"];
i tried multiple times, but its not working, what should i do, please help..
I am using cocos2d-x 3.8.1.
This reply has been verified.
-
Sonar Systems adminLikes 0
The problem has now been fixed, please download the latest version from GitHub.
Sorry for inconvenience caused.
This reply has been verified.
-
mihir77Likes 0
No Problem, Thanks..
When are you going to launch local notification for android? Please launch it as early as possible..
-
Sonar Systems adminLikes 0
We are still working on it.
Hopefully soon.
Login to reply