I need to create an app which enables the caller in the other end to hear music while I press hold on my iPhone. This music will be selected from my library. Is there any API or anything which can help me with this?
There is no public iOS API by with an app can either send or receive audio from the Phone app during a phone call. The security sandbox will prevent even a private API from doing this on a stock OS device.
Related
I would like to develop an IOS app to get notification such as title and body from all applications in iPhone. Is it possible to do that?
No it is not. On Android, yes this is possible. But not on Apple. They restrict permissions so that you cannot access that information as a developer.
Every application is given a sandbox, a directory it can use to store data in. If the application needs access to data on the device that isn't located in the application's sandbox, it needs to request the data through a system interface.
App can only read their notifications, other things are possible with Jailbreak.
Learn about app sandbox here
I ask the user for a review at the end of the conversation using a basicCard.
It is not possible on a device with no screen or web browser so essentially I can only ask for reviews when my action is used on an android or iOS device.
So, is it possible to send a notification from the user's non screen device to his phone?
You can use multi-surface conversations, which will allow you to send a notification from a speaker to a phone to continue the conversation with the same session.
I need to detect on iOS the incoming number during ringing to use it into an action.
It is possible in iPhone?
No, Apple do not provide an API for this.
No its not possible to track incoming phone calls in iphone sdk. If you do this with some private API your app will get rejected from app store.
I want to alert the user about an sms while my app is running. I am a bit confused if it is possible to get an SMS notification while the app is running. Which API should I use if this is possible?
It's not possible with the public API. There is no public API for it.
You might be able to do it via private API on a jailbroken device; I really don't know. If so, keep in mind that you won't be able to ship an app using that API in the app store.
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.