How to use SMS and iMessage notifications on bluetooth device (like smart watch ) using Message Access Profile in iPhone? - iphone

How can I get notifications on bluetooth device (like smart watch) when there is an SMS or iMessage using Message Access Profile.These things are already implemented in smart watches like pebble.I would like to know how can I achieve this using ios sdk.
I posted couple of question on SMS,iMessage notifications using MAP in iPhone.Here are the links to those questions
How to use Message Access Profile (MAP) in iPhone

You don't do anything to get MAP support — it's tied in to the push notification system. Any notification will get sent over MAP to any paired Bluetooth devices that implement it. (I think if they have a MAP paired device, the user can set which apps send MAP in notification settings.)
There are apparently some bugs at the moment, according to the Pebble team — sometimes you have to toggle the notifications switch for each app off then on again before it starts pushing them.

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. And the finally solution is MAP.

Related

How can Apple Watch listen to data change on iPhone?

Let's say the iPhone has a text field or any internal data, upon the data change, I want to push it automatically to the Apple Watch. I know I can use the share data. But that seems to require user to initiate the call (e.g. pressing a button) on the Watch. Is there a listener on the Apple Watch that I can use if there is a change in the shared data? Or there is way for the iPhone to automatically push data to the watch, and the watch just receive it and display it? Or any other way?
You can see this answer. MMWormhole seems a good way to communicate between App and its extensions (i.e. Watch App).
Hope this helped.

Watchkit - How to schedule notification only for Apple Watch?

I have created an App with Apple Watch extension.
I would like to know if it's possible to schedule a notification that only appears on the Apple Watch. And conversely, can we schedule a notification to only appear on the iPhone?
This is a great question, but unfortunately it is not possible at this time. Apple is trying to be very pragmatic about how they direct notifications. If you iPhone is unlocked, they assume you are looking at it and will route notifications there. If you iPhone is locked, then all notifications will be routed to your Apple Watch. They want to avoid duplicated notifications in both locations at all costs.
Currently there is no ability to force route remote or local notifications directly to the Watch only. If you feel strongly about this feature, then I would suggest you file an enhancement radar with the Apple Bug Reporting System.
In the official Apple documentation they said that:
Apple Watch takes full advantage of the existing interactive
notification support on iOS. If your iOS app supports notifications,
Apple Watch displays those notifications at appropriate times. When
one of your app’s local or remote notifications arrives on the user’s
iPhone, iOS decides whether to display that notification on the iPhone
or on the Apple Watch. For notifications sent to Apple Watch, the
system lets the the user know subtly that a notification is available.
If the user chooses to view the notification, the system displays an
abbreviated version of the notification first, followed by a more
detailed version. The user can dismiss the detailed notification,
launch your WatchKit app, or act on the notification by tapping an
available action button.
https://developer.apple.com/library/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/BasicSupport.html
So I think you can tell to iOS the behavior of your notifications (When one of your app’s local or remote notifications arrives on the user’s
iPhone, iOS decides whether to display that notification on the iPhone
or on the Apple Watch. For notifications sent to Apple Watch, the
system lets the the user know subtly that a notification is available.)

Can we play prerecorded message in a call through iPhone app?

I want to create an iPhone app with following features:
User should be able to make a call to number.
App will play the prerecorded message when call get connected.
After playing the message, line will be connected and user will be able to communicate with the person to whom he made the call.
I heard that Apple doesn't allow the developers to interact with the calling functionality of iPhone but is there any way to achieve this. Please suggest!
Thanks-
You have heard correctly, According to Apple Developer Library, it is not possible to intercept the calling functionality.
Simple Apple does not allow such stuff with current sdk.
Not so sure but, May be possible for jailbroken iPhone app.

Messaging service within my app

I need to implement a message service into my app that works exactly like this:
users register with a nickname within the app
they can add contacts (just nicknames) and send them a message by just specifying their nickname
they can send a message whenever they want, and the message is stored on a server until when the receiver connects to internet.
when a message is received, a push notification is triggered.
So, the messages work pretty much like emails, however instead of using email addresses, we only use usernames. I'm also going to build my own back-end for it.
Which APIs should I use or which 3rd party framework can I use ?
And any tip ?
N.B. I need to make it work with iOS 3.0 as well.
and in the future I will develop an Android app, so the nicknames should be unique and I should be able to send messages from iPhone to Android devices within the same app.
thanks
I've successfully used the Three20 library and would recommend giving it a try. It's an open source spin-off originated by the author of the Facebook app. It features a bunch of additional GUI components that might be useful to your project, like a message composer that resembles the one used by Apple's email app.
Also, Three20 features a nice framework for handling navigation within your app. Currently, the biggest drawback seems to be that certain features don't play well with the iPad API.
The answer seems to be Push Notifications

Store value of AlertView in iphone

HI,
I'm aware that accessing the SMS incoming isn't possible in the iPhone SDk but could i read the alertView that is active on the iPhone (ie. new SMS alert) and store its values into a variable? Obviously this would require backgrounding but in theory could this work?
As other stated, you cannot see the SMS message or associated alerts.
Not sure about iOS, but on other platforms (e.g. Java ME) it is possible to address an SMS to your application instead of the phone's "inbox" (default handler). This requires that you control the server sending the SMS message.
I imagine even if you could catch an SMS targeted at your iOS app, you wouldn't. Instead use Apple's Push Notification system.
I hesitate to type this in an iOS related question, but the Android OS makes it pretty trivial for an app to see SMS messages. You can even be woken up as they arrive. So, if you just want to test out some idea you have, consider that.
No. You can access your own alerts but not those from other applications.
Unfortunately, you cannot access other application's data, be it in background or not.