Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
UINotifications Plugin - Local Notifications for iPhone — Gideros Forum

UINotifications Plugin - Local Notifications for iPhone

SatheeshJMSatheeshJM Member
edited July 2012 in Plugins
Ok. This is my first ever shot at Objective-c, so bear with me ( seriously, obj-c is horrible >:P )

I wrote this small plugin for scheduling Local Notifications.
https://github.com/SatheeshJM/Notifications-Plugin-for-Gideros-Studio


USAGE
require "notifications";
 
notifications.scheduleLocalNotification
{
 
alertBody = "Hello Gideros!!",
hasAction = true,
alertAction = "Check It Out!",
badge = 12,
 
--time = "2012-06-05 20:42:32 +0530",
timeInterval = {seconds = 5},
}
But, I do not know how to handle the notifications. I mean, when the user opens the app throught the notification, how do we detect and handle that? I tried, but to no avail.

Any help is appreciated.

Likes: mehmetuysal

+1 -1 (+1 / -0 )Share on Facebook

Comments

  • Seriously cool little plugin - thanks.
    I think for the detection when you open the app you need to pick up the custom URL scheme for your app, here's a link to some sample code.

    http://mobiledevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html

    Although I doubt this is something we can sort out, it would have to be exposed by @Atilim (I think)

    However - I think you can work around this, given that you are setting the local notification (are they only based on time??), you could make sure you save an appropriate flag when you initialise the notification and then when your app starts just check the flag and then you can have a pretty good idea why your app was started (if that makes sense).

    WhiteTree Games - Home, home on the web, where the bits and bytes they do play!
    #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
  • Oop, I've just do a dup work.
    Nice work @SatheeshJM. I would better if you support a callback event when launching app from local push notification. I've got stuck here too
Sign In or Register to comment.