I am developing a push-notification app for the iPhone and Android. I need the app to take a GPS-tracking reading when the push gateway notifies it to wake up, then send it to a home-base website. I'm using CodeName One for cross-platform development and find it works great for most things. I'm evaluating PubNub for possible use as the push gateway.
I have been studying the tutorial on developing the push gateway in the Objective C location in GitHub. (https://github.com/pubnub/objective-c/tree/master/iOS#apns-setup). It's useful but the Objective C aspect can sometimes get in the way. Unfortunately, one can't just copy the code into the app, as if it were in Java.
Also, it looks like there are some tricks in CodeName One that need to be addressed as well. I wonder if there are any tutorials out there that focus on CodeName One, specifically for developing push-notification applications. So far, I have found lots of stuff for data streaming, or for publishing, but nothing for push notification.
Am I missing something?
Craig R Lang,
Craig - we don't have anything specific for CN1 as it gets very little demand. Best I can suggest is work with the Java SDKs and ask us questions as they come up.
Looks like Java has the same issue. I see the ability to publish but not to receive/wake-up
@Craig, PubNub doesn't do anything on the receiving end, we initiate the push notification via GCM/APNS and those services actually deliver the push notification to the device. We are not in the picture when the push notification comes in. Handling the receipt of a push notification is an application level concern and is different for each platform.
Natively, each platform has a different approach to receiving push notifications and I am not sure how, or if, CN1 provides a layer of abstraction for this capability.
I was able to find:
Which seems to indicate this class handles receiving a push notification.
In the third paragraph on that page it talks about implementing a "PushCallback" to receive a push notification.
Yeah, that's what I'm using now.
CN1 has their own push notification mechanism, both sending and receiving. So, for the time being, I commented out my PubNub code and cancelled my PubNub Push Notification trial.
Now I am sending a push message directly from my web site to the CN1 server. Working OK so far, I think.... :-) I'm in the middle of experimenting with all of that. Not sure how it will work out yet. Still in the working-out-the-technology phase of all of this.