IPhone push notfication for a webapp? - iphone

Is it possible to implement IPhone's push notification service for a
Webapp that has an icon on the "desktop"? If so how?

That depends on exactly what you mean by Webapp that has an icon on the "desktop"?
No, if you're referring to a webapp where you have saved a link with Add to Home screen as per this Apple instruction.
Yes, if your webapp is a thin CocoaTouch shell using webkit.

i have an alternative solution for this:
1) create a gmail account and get gpush app on your iphone (setup the gmail in the app).
2) instate of sending direct notification to iphone, you can send an email from your webapp to the gmail account.
3) within 5 sec. you will receive the push notification.
hope this help.

You can always delegate the messaging to 3rd party notification apps.
One great example is Boxcar (http://boxcar.io/).
You can have your web app send notifications via their API and have them delivered to the app. Lastly, you can the use deeplinks in your message to open your webapp to point the user to the content item you wanted to bring their attention to.

No, it's not possible. It's only for cocoa touch (AppStore) apps. If you want more info, take a look on the documentation.

another alternative: use an sms service like http://www.smstrade.de/ to send an sms to the user's phone. That's the way I do it.

Another provider for sending sms as notification is https://bulktrade.de
There works world wide

You can use HTML5 to introduce your own push messages. From wikipedia
"For the client side, WebSocket was to be implemented in Firefox 4,
Google Chrome 4, Opera 11, and Safari 5, as well as the mobile version
of Safari in iOS 4.2.1 Also the BlackBerry Browser in OS7 supports
WebSockets."
To do this, you need your own provider server to push the messages to the clients. If you want to use APN (Apple Push Notification), you must have a native application which must be downloaded through the App Store.

From iOS 6.0 I noticed that a WebApp icon placed on homescreen automaticly refreshes after each webkit open of webapp. Of course if you change this icon on the webserver. So theoretically you can display any informative content in this icon(numbers, status etc) BUT it will not refreshes instantly - only after opening and closing a webkit webapp.

Related

Unity Facebook apprequest works but no notification shown

How do I make my mobile game send a request that is shown as notification like in Candy Crush Saga game.
I went through this App requests successful, but no notification shown but can't find the solution. I don't know what to put in my canvas URL.
GAME is developed in Unity3d.
Solved ..... Your mobile app must pe on facebook (i.e on facebook appcenter ) ..then only it will be shown as notification
I faced the similar issue .. there is something that need to be done on FB App settings->Basic, Add another platform "Facebook Canvas". This solved the issue
The canvas apps means- the apps displayed inside facebook.com.
I think you are having the mobile app not a canvas app, so Notification API, which is still in beta do not supports the notification in mobile. Acc to doc-
Currently, only apps on Facebook.com can use App Notifications. Notifications are only surfaced on the desktop version of Facebook.com
So instead of notifications API, you can use different kind of Requests- whichever is more significant in your case.

iPhone url scheme with content body to SMS

I'm a Java/Web developer and I don't know anything about iPhone applications.
I did search on the Internet and the following steps are what I think people suggested but I want to confirm.
I would like to know if the following steps will allow me to send a content body to SMS messages when a user clicks on a link on a web page.
Build an iPhone app that takes content body and receiver phone number.
Make the visitors to my webpage download the iPhone app in #1 (using javascript to check if s/he already has it and a custom url scheme to open the iPhone version of "PlayStore")
The visitor installs the app.
Call the iPhone app in #1 using a custom URL scheme, from a link on a web page. This link contains the phone number of the receiver and a content body
The iPhone app in #1 then opens the native SMS app in iPhone, this time with a body.
Is this
1. possible ?
2. the right way to do ?
EDIT :
To make things clearer, what I need are...
It shouldn't be the web server that sends the SMS. The client who gave us the job does not want to pay for that. The client wants each visitor send their own SMS and pay for it.
I made a mistake. The phone number of the receiver should be empty. Only the content body is pre populated. So if I clicked on the "send SMS to my friends" link(on a webpage), it opens the native SMS application.(at least, this is how it works on android devices currently). And then the visitor would type in or select the phone number of the receiver from the contacts on his device.
No, you cannot open the SMS app with a message body. The only way to send it is by using MFMessageComposeViewController (iOS 5.0+) as shown in this page. If you need to support earlier versions, you are out of luck.
I'm not sure that Javascript can "check" that the device can run a url scheme either (I'm almost certain it can't check what apps are installed), but I'm not an expert at that kind of stuff.
As far as you are launching your application with some data using Custom URL Schemes this might help you calling your app with some parameters
http://www.idev101.com/code/Objective-C/custom_url_schemes.html
For step #5 its not possible
Short Answers:
No.
No. The "right" version would be to send the SMS from your webserver, using something like NowSMS.

iPhone Push notifications via mobile safari

Is there a way to simulate push notifications by pushing data to mobile safari? Here are 2 scenarios.
I make a web app via phonegap and dont want to use APNS but rather make a web-socket connection and push data to the device myself. On the device end is there a "alert" function I can call to emulate a pop up when a user is not in the application?
Lets throw web app out the window. Is there a way I can do this in native mobile safari? Im not talking about a plain old JS alert window that would only come up if the user was in the app, but be able to do so with it backgrounded.
You cannot run background tasks with mobile safari so for #2 you can't do true push notifications or alerts. However you can send a user an SMS if you have the user's phone number. This can have a hyperlink to a part of your web site (which can contain some sort of payload). You can use a service such as Twilio to help you send SMS'es. However this costs money. APNS does not.
For scenario #1 I'm assuming you're talking about a native app using a phonegap solution. In this case when the app is backgrounded you cannot access any UI at all and wake up the app and show a UIAlert. In fact unless an app is registered for location updates or background music, the app is effectively not going to respond after a set period of time (it only can "finish" certain operations it had started before). So the websocket solution will only be effective if the user has the app opened.
You could register a local notification that runs at some predetermined time which will show an alert. But that is not being pushed from the server so its probably not what you want.
APNS is your best solution for scenario #1. Its not that hard to implement and its pretty inexpensive. Check out urban airship if you want to avoid building out your own server-side components for it.

Apple push: does it need an application at all?

Do we need to install an app to receive some push from a service ?
Is there a way to register an iphone somewhere (website / apple server) without having an app installed on the iphone to register to the push service ?
Apple Push Notification Service is to be used with native iOS applications. Without an application APNS cannot be used.
you are saying you want to push a message to a particular iphone, but not have it related to any app? This is basically a text message, and you could do this from a server remotely using SMS.
Yes, if you want to use Apple Push Notification Service, you will need an app.
But go have a try at notifio.com

iPhone: How to Programmatically Respond to SMS Messages

After a review of the iPhone SDK documentation, I have not yet found a way for an application to be written such that it can programmatically process the content of an incoming SMS message within the iPhone platform. The idea would be for such an application to be running in the background and based on specifically formatted SMS messages would be able to take specific actions.
Does anybody know if this is possible with an iPhone SDK application and if so, provide a pointer to information about how this can be done?
Unfortunately, you cannot intercept - or be notified of - incoming SMS messages with the iPhone SDK.
One possible alternative, is to register a custom URL scheme that launches your application when a url with that scheme is embedded in the sms message and the user cicks on it.
to set a custom url scheme, you must implement both the CFBundleURLSchemes and CFBundleURLName keys in your application's info.plist.
In your Application's delegate, you can then implement the application:handleOpenURL: method to get any paramaters that were passed to your App from the url in the SMS message.
I believe that currently the SDK doesn't allow for background apps (except for apple ones).
BREW and J2ME had (and probably still have) ways to launch your app via specially formatted SMS, which may be what the Jeff is referring to.
Apple does have the upcoming Push Server which will allow you to send the user an alert which will give them the option of launching your app, but you cannot launch your app for them.
Unfortunately just registering an URL scheme dosn't help you at all, because the SMS app makes "http://" urls clickable only...
You can use CoreTelephony framework.But you must user some private api.And I have some demo code for this. https://github.com/edison0951/AppNotifyBySMSDemo