SMS to iPhone app - Google Maps - iphone

is there a way to have a Map/GPS app hook into the iPhones SMS reader so that it can parse the message and map to that area?
Specifically I'm thinking of a situation where I'm looking for someone's house and they text me their address. I would (from the SMS) be able to say "Map This" and that would send the text to the GPS app and get directions from where I am to that location.
Obviously there would be some error handling for situations like misspellings, locale names ("Burger King", "Hell"), and city/state guesses, but much of this is already handled by Google Maps.
Mostly I'm wondering how to tie the App to the SMS without having to copy/paste.

The public SDK doesn't provide an SMS API, so you cannot hook into the SMS messages. If you are building a location sharing app, you might consider having your own messaging transport layer using the Push Notification functionality.

Related

Is it possible to send rich responses to google home app?

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').

Add a new sms into iPhone inbox programmatically

I searched all already asked questions here on Stack Overflow, and all of them deal with "sending" an SMS programmatically to another phone and that is NOT what I want.
I want to just add an SMS to the inbox, without using the cellular network or any other service and write a from "my_company_name" etc. Basically I want to avoid making the user or my company pay for the SMS. I know about push notifications and I will use them as well, but I need SMSs.
I thought about that maybe, if the user sends the SMS to himself it would be free of charge, but that "seems" to be not true at all.
The Messages app (and its notification UIs) only displays messages that come in over SMS or iMessage. What you're looking for isn't possible with public API.
As there is no public API available to do this (I guess you already now that), you'll have to go for the private APIs.
You might want to take a look at the source code of BigBoss's WifiSMS. This app allows one to control the iPhone's SMS system thru your computer. I haven't tested it myself yet, but BigBoss is a pretty credible application creator when it comes to jailbroken devices.

auto sms when user is busy

I'm a Objective-C / iPhone newbie. I want to develop an app that would automatically send an SMS message when the user is busy. I don't know how to go about it, please help me.
You cannot send an SMS message without user interaction on the iPhone using the public APIs. The only supported way to do it is using the MFMessageComposeViewController class.
There may be a way if you're developing for jailbroken devices (I don't know anything about that), or you could have the program contact some sort of web service that would send the SMS message for you (i.e. the message would come from the service, not the device).

How to create a system that will receive SMS messages with a location in the title and automatically transfer that information into Google Maps?

I'm looking at building a simple app based around location. Obviously given that lots of people don't have access to smartphones etc, I'm trying to figure out a way to allow them to text in their address/location details to an automated system that will locate them on Google Maps. Is this possible? And if it is possible, is it possible to also automate a system that will then send that location and data to a third party (either via 3g, wifi or SMS)?
You need a SMS service provider really, to send a recieve bulk sms. You can get away with a tethered phone if nessecary, but you're going to have to pay for sms either way and tethered phones tend to require a fair bit of maintainence. I wouldn't nessecarily recommend any SMS provider over others, but be wary of any that seem overly cheap - there are some dodgy ones who will do things like taking your contact numbers and selling/spamming them. One like Clickatell should do you.
Google Maps has an API with some good documentation. I'm not quite sure what you want to do from your description, but hopefully you should find what you want there. Failing that, don't forget to look at Yahoo! Maps API or Bing Maps API. Unlike search, mapping is not a one horse race...
To receive incoming SMSes, you would normally need an SMS gateway which supports incoming SMS.
Clickatell is a popular SMS gateway. It works in 200+ countries, and ironically it is being advertised right next to the text box I'm writing this answer!
For incoming SMSes, you would have to expose an interface from your server through: HTTP, SMPP, SOAP or FTP. For example if you use the HTTP GET and you provide this URL to Clickatell: http://www.yourdomain.com/incoming-sms/, then Clickatell will send you this type of GET request with every incoming SMS:
https://www.yourdomain.com/incoming-sms/?
api_id=12345&
from=279991235642&
to=27123456789&
timestamp=2010-02-1921:29:50&
text=Here%20is%20the%20messagetext&
charset=ISO-8859-1&
moMsgId=b2aee337abd962489b123fda9c3480fa
As soon as you receive the address within the SMS body, you would have to get the latitude/longitude coordinates through the Google Maps API Server-side Geocoding Service. If you are using php, this would look something like this:
$url = 'http://maps.google.com/maps/geo?q=Oxford+Street,+London,+UK&output=csv&sensor=false';
$data = #file_get_contents($url);
$result = explode(",", $data);
echo $result[0]; // status code
echo $result[1]; // accuracy
echo $result[2]; // latitude
echo $result[3]; // longitude
Once you get the latitude and longitude, you can store them in a database for later plotting on Google Maps.
Note that the server-side geocoding service may only be used in conjunction with displaying results on a Google map; geocoding results without displaying them on a map is prohibited by the Google Maps API Terms of Service License Restrictions.
If you want to use the Clickatell SMS gateway to send a response back via SMS, their API offers a choice of outgoing connection options via: HTTP/S, SMPP, SMTP, FTP, XML, SOAP, COM Object.
The HTTP/S method is as simple as this: http://api.clickatell.com/http/sendmsg?to=NUMBER&msg=Message+Body+Here (Clickatell API Guide).
The SMTP method consists of sending a plain-text e-mail to: sms#messaging.clickatell.com, with the following body:
user: xxxxx
password: xxxxx
api_id: xxxxx
to: 448311234567
text: Meet me at home
It sounds like you are talking about Google SMS's maps command.
You send an SMS to 466453 ("GOOGLE" on most devices) and if you had texted
map 5th avenue new york
you'd get back
Map: 5th Ave, New York
http://m.google.com/u/x195Ag
Taping that link brings you to a google maps of that address (though in safari, not the google maps app).

iPhone Programming: Send a text message? Access contact list?

I'm still new to the API and I wanted to ask:
Can you send a text message programmatically?
Can you access the users contact list programmatically?
I'm thinking no. I haven't seen anything about text messaging in the API, and I figure the sandboxing that the iPhone does keeps you away from the phones contact list.
Thanks everyone.
1) I'm afraid you can't send SMS with the iPhone SDK although you can make a link to send an SMS like so:
a href="sms:408-555-5555">408 555 5555</a>
2) You can access the contact list with the Address Book UI framework
one way round the sms/mms problem is to use an external aggregator then you can utilise http between a server and the iphone to send sms obviously there is a cost involved this way to the developer
Yes You can build an app to send SMS.
All u need a server API, which u gonna call through ur code, to send sms.
I am saying this bcoz i am currently working on it.
As soon as i m done with my app,i am gonna share it.
http://shishir.com?from=shishir&to=shishir&message=hi&sandbox=false&username=user&password=pass
u hv to pass values through URL.
will go in deep very soon.
regards
shishir