Is it possible to have a background app display a notification based on who is contact details from an incoming caller, either before the call is answered or during?
No, the system will not allow you to interact with phone calls in any way.
You can set the image for certain people in the address book using the Address Book API. That way, a certain background image (potentially with a textual message) will be shown, based on who is calling.
With time, things change. Look at sync.me, when you get an incoming call, the latest post on facebook will show just above the accept/decline button. Though I still can't get the idea of how it is done.
Related
I developed a actions on google app which sends a rich response. Everything works fine in the Actions on Google simulator. Now I want to test it on my Google Home Mini but my rich responses are not told by the mini. I would like to ask if it is possible to send my rich response to the google home app? The home mini says something like "Ok, I found these hotels, look at the home app" and there are the rich responses?
You can't send users to the Home app, but you can direct them to the Assistant available through their phone. The process is roughly:
At some point in the conversation (decide what is best for you, but when you have results that require display is usually good, or if the user says something like "Show me" or "Send this to my phone"), determine if they are on a device with a screen or not. You do this by using the app.getSurfaceCapabilities() method or by looking at the JSON in the originalRequest.data.surface.capabilities property. If they're using a screen, you're all set. But if not...
Make sure they have a screen they can use. You'll do this by checking out the results from app.getAvailableSurfaces() or looking at the JSON in the (not fully documented) originalRequest.data.availableSurfaces array. If they don't have a screen, you'll need to figure out your best course of action. But if they do have a screen surface (such as their phone, currently) available...
You can request to transfer them to the new surface using the app.askForNewSurface() method, passing a message explaining why you want to do the switch, a message that will appear as a notification on the device, and what surface you need (the screen).
If the user approves, they'll get the notification on their mobile device (using that device's normal notification system). When they select the notification, the Assistant will open up and will send your Action an Event called actions_intent_NEW_SURFACE. You'll need to create an Intent that handles this Event and forwards it to your webhook.
Your webhook should confirm that it is on a useful surface, and then proceed with the conversation and send the results.
You can see more about handling different surfaces at https://developers.google.com/actions/assistant/surface-capabilities
Rich responses can appear on screen-only or audio and screen experiences.
They can contain the following components:
One or two simple responses (chat bubbles)
An optional basic card
Optional suggestion chips
An optional link-out chip
An option interface (list or carousel)
So you need to make sure that the text response is containing all the details for cases like voice only (e.g. Google home/mini/max).
However, if your users are using the assistant from a device with a screen, you can offer them a better experience with the rich responses (e.g. suggestion chips, links etc').
I am developing the App, When i receive the call ,I am changing the contact picture of that person who has called , I am fetching his number from the server , i know i cannot access the incoming number ,so by developing this kind of application will apple approve my App ?
I am not violating any Guideline or Rules ,but i just want to know does Apple allows this changing the contact picture of person programmatically ?
You can change a contact picture, check the Address Book Programming Guide for iOS.
About that idea of doing something when you get a call, your app can't be notified when you get an incoming call, there's no API for that, so there's no way of doing this the way you are planning.
I'm using an ABPersonViewController and I was wondering if it is possible to return to my application after making a phone call or sending an email/message instead of exiting to the respective native apps.
On the iPhone Contacts app, you can make a phone call by pressing the phone number field. Ending the call automatically takes you back to the contact screen. You can also send an email and message by clicking on the respective fields (though ending the email/message action does not take you back to the Contacts).
To be more specific, tapping on "mobile 1 (555) 555-5559" should make a phone call to that number (my app already does that). However, when I end the call, I would like to be directed back to my app and not the native iOS Phone app. I would like similar actions for sending an email and message too.
If this is possible, it would be great if someone could share the solution! Thanks for any help.
it is possible to return to my application after making a phone call or sending an email/message instead of exiting to the respective native apps.
AND
Ending the call automatically takes you back to the contact screen
In SHORT : It is not possible because Apple/iOS Does not Provide this type of Feature.
Is it possible to prevent editing when MFMessageComposeViewController shows up?
'Cause I want the body of SMS can't be changed by user and I think it's still legal.
Please help!
No the user has final say when using the MFMessageComposeView.
Your app is also prohibited from changing the content/recipient/body of the email when the
view slides up.
If you could do this it would be easy to paste in a different recipient, sniff the content provided by the user etc. etc. (especially in the Message App, you could swap the phone number and do terrible things.).
I guess this is the logic behind, you get to pre-populate the message, but the user decides from there on and until "Cancel" or "Send".
You should probably build a web service where you have control over the data
when it hits the server and make an interface for that on the phone.
I need to be able to give users the ability to call someone or email someone from a certain view in my navigation based app.
I thought I would use an action sheet with the choices and depending on the button pressed allow one or the other to be initiated (I'm simplifying a lot but ...).
I really have several questions.
Assuming this is possible to do, will my app be gone after a phone call is started?
Is there a way for me to launch/push on the stack the same "controller" and "view" that Apple uses for making calls and sending emails? Or am I going to have to code this all myself to look like their app?
I want the user to come back to the same page they were on when the email or phone call was initiated. How can I do that or is my app gone if I use their controller and nib?
Assuming it's possible to do either of these things, can I put the email address I want for a default in the to: field of the email view and if so how?
Here are the answers to your questions:
Assuming this is possible to do, will
my app be gone after a phone call is
started?
Yes.
Is there a way for me to launch/push
on the stack the same "controller"
and "view" that Apple uses for making
calls and sending emails? Or am I
going to have to code this all myself
to look like their app?
Yes. MFMailComposeViewController for Mail, and [[UIApplication sharedApplication] openURL:[NSURL URLWithString:telephoneText]] for a Call
I want the user to come back to the
same page they were on when the email
or phone call was initiated. How can
I do that or is my app gone if I use
their controller and nib?
For Mail this can be accomplished with MFMailComposeViewController. It's not possible for a telephone Call.
Assuming it's possible to do either
of these things, can I put the email
address I want for a default in the
to: field of the email view and if so
how?
Yes.
You can look at the sample code https://developer.apple.com/iphone/library/samplecode/MailComposer/index.html or the tutorial http://blog.mugunthkumar.com/coding/iphone-tutorial-in-app-email
unfortunately if you make a phone call then the application is terminated. For email however, I believe there is a framework or something to do that, I think it's in the messaging API, but I'm not 100% sure as whenever I use email stuff I just do a mailto: url (which closes the app)
You can not make a phone call from within you application without exiting your app.
You can send an email inside your application using MFMailComposeViewController. Your application will remain at whatever view it was at when you present the Mail Compose View Controller view. You can set all of the normal fields in an email (subject, recipients, cc, bcc, body, ect...).