How to send sms messages to be detected in iOS application - ios

I want to be able to open my application or receive a notification when the app receives a text from a specific number.
For example, I want my application to check for this number: 301-212-1312
and every time a text from this number comes to my phone, i want the app to create a notification or open. And upon opening, it parses the information in the text and searches for a html or web link. That link is then displayed in a label to the user in the application.
Sample Text from 301-212-1312:
Hey can you help me with my code, I even tried searching for solutions on www.stackoverflow.com
Sample Application action:
Application opens, parses text from number and displays only the web link
Click here to go to page: www.stackoverflow.com

You won't be able to do this the way you want to. Apps in iOS are sandboxed, so they live in their own bubble and don't have access to other system events such as receiving a text from a certain number. Instead, what you would have to do is create a specific link that your app can open, and have that link deep link to your app (which is new as of iOS 9) be sent in your message. Think getting a message from someone that sent you from Floorboard, where you click on the link and it takes you to that story in the app, rather than their website.

Take a look to XMPP protocol, you can find some implementation from github
A definition from wikipedia
Extensible Messaging and Presence Protocol (XMPP) is a communications
protocol for message-oriented middleware based on XML (Extensible
Markup Language).1 It enables the near-real-time exchange of
structured yet extensible data between any two or more network
entities.2 Originally named Jabber,[3] the protocol was developed by
the Jabber open-source community in 1999 for near real-time instant
messaging (IM), presence information, and contact list maintenance.
Designed to be extensible, the protocol has also been used for
publish-subscribe systems, signalling for VoIP, video, file transfer,
gaming, Internet of Things (IoT) applications such as the smart grid,
and social networking services.

Related

Is it possible to integrate Google Assistant with my custom app?

I would like to integrate Google assistant inside my app. The idea is that I have a app which provides various press services, like giving latest news and such. I would like to integrate Google assistant for handling some particular requests. For example the user may ask, "what did the Lakers yesterday?" If i search this on Google or ask to the assistant, i will get a card with the score of yesterday's game. I would like, from inside my app, to replicate this interaction, that is sending the request to Google assistant and showing the answer that Google return to the user (or at least opening Google assistant with the answer)
Is such a thing possible?
I was looking at Google Assistant service sdk (https://developers.google.com/assistant/sdk/guides/service/python/) and it says:
The Google Assistant Service gives you full control over the integration with the Assistant by providing a streaming endpoint. Stream a user audio query to this endpoint to receive a Google Assistant audio response.
Is this possible only with audio interaction? I'm not quite certain this is the solution I should look into
The Google Assistant SDK Service allows you to send both audio or text to the Assistant and you'll get back responses including audio, display text, and rich HTML visual content.
For mobile apps, there's less support compared to Python, but it's still doable. For example, there's a version of the SDK for Android Things, which means for IoT devices like a Raspberry Pi. You can go through this project and remove all the IoT references, but it's something you'd need to do yourself.

Apple iMessage Extension API. Detecting whether recipient is using iMessage

Is it possible to detect (programmatically), from an iMessage app extension: from the sender side: Whether the person you are talking to is using iMessage on their end, or they are an SMS/MMS user (Such as Android or Windows phone)
Basically I need to tailor my delivery experience based on whether they can render the fully rich experience, or a minimized subset of it.
For example, for iMessages, I actually want to deliver in-line video. For MMS/SMS, i maybe only want to show an Image only, or maybe even a Link only, to avoid the recipient's SMS/MMS charges.
No API is available for this. It's a really good idea though. I suggest you file an enhancement request with Apple. [Update: if anyone from Apple happens to see this, I've filed rdar://32773566 to request this.]
One possible workaround-- depending on how your app works with these videos-- is to upload the video somewhere and then send the URL as the message. On iOS, Messages.app will render a nice preview of most videos, if the sender is in the recipient's address book or the recipient has sent messages to the sender in the past.

How to extract the user cell information from received message?

i am about to develop a location based service for simple mobile (a mobile have no GPS,or wifi) through sms. so to know the location of my user i want to know with which cell Id are they communicating. Therefore how can i extract their cell information from the message i received from them?
The SMS message does no contain any infomration of the sender's location, thus there is no ways you could extract that information from the received SMS message.
Anyway's there are Cellbased positioning APIs available on a device, so check the platform you are developing for, and see what APIs there are offered.
And then of course you can have the location sent over SMS to receiving end, but indeed it would mean that you have your application running in both ends.
In general Phone operators can offer location based services, in which they could locate devices which are using their network, but in general they usually don't let normal developer to access that kind of infomration.

iOS using sockets to talk to other apps

Is it possible to have 2 apps on 1 iPhone/iPad talk to another via sockets? For example The main app is phonegap app that just displays data and when the user clicks the print button, the 1st app sends data to the 2nd (2nd app stays in the background, I guess it is a service), it (the 2nd app) then sends that data to a printer that it knows how to talk to whether that is via a webservice call or something else.
From my scan of the docs and other questions it seems the custom URL is one way to make the apps talk, but I want the receiver app to stay in the background. So do I have to use a server/client approach to this? Is that possible.
Sure you can. Just make sure your 2nd app - the background app is conformed to Apple's requirement to run in background modes. You can also use Bonjour to aid in discovery or just pre-selected a port and make other apps aware of it value.
No, there is no socket-based interprocess communication between apps on an iPhone, nor is there any concept of apps as background services. Using custom URLs to launch another app is the only direct method of communication between apps.
On the other hand, if the 2nd app is talking to a printer (or anything else) via a web service, I'm not sure why you wouldn't just have the 1st app use that web service to print directly. Is there a particular reason you need a background app to perform this function?

How do skype extensions for browsers actually work?

We have plans of developing a web application that will have to communicate with our locally running application. One of the possible options is using browser extensions. I was looking into how Skype add-ons to browsers communicate with Skype client. In Firefox, Skype add-on inserts a piece of HTML when it encounters a phone number.
Is this
<span skypeaction="...">
processed by a Skype extension which makes a call using Skype API? Do extensions for other browsers use Skype API or other communications mechanism?
I did a bit of research and here's what I found. When the user clicks on the Skype link injected by the extension, the extension creates a new Skype process and passes it the parameters specifying the action and the number. Custom protocol handler is not used.
The Skype extension would use regular expressions to search for valid and visible phone numbers displayed on a webpage, and as you say it would wrap a span class around it.
The span class would be defined within the extension code, and would insert the skype icon along with a clickable link that launches the skype application.
You also see similar functionality from iTunes and IRC, they have links in the irc://... format.

Resources