IOS - Possible to receive notification when user receives a text? - ios

Is it possible to receive a notification when a user has received a text within the iOS SDK?
For example if your app is running, and you want to track the number of text messages received while the app is in the foreground.
I know it's not possible, I just wanted some additional confirmation for my higher-ups
Thanks

No. Apple will never do this as it's a huge privacy violation.
You may be able to infer something happened by noticing your app resigned active, but that's a very unreliable measure of anything interesting.

Not in the normal SDK. Probably for jailbroken phones.

No, it’s not possible.
Also, you can’t detect if the user receives an iMessage.
And since you may resign active for any number of reasons (like getting a phone call), you can’t really infer anything.

Related

Watch Connectivity: Transfer user info when phone not nearby

I am trying to transfer data from Apple Watch to iOS. I use transferUserInfo to do so. It is very likely that, when I call that method, the phone is not nearby (and therefore not reachable).
As far as I understood the documentation, the user info should be queued and delivered to the phone by Watch Connectivity when the phone becomes reachable again. This does not seem to be true for me, instead my session delegate's session(didFinish:error:) gets called with a Transfer timed out. error.
This is bad since that means the watch app and iOS app need to be active at the same time in order for iOS to receive the latest info. Is this expected behaviour, and is there any way to fix this?
I know that application context might have the behaviour I need, but the message size for application context is pretty limited, which might be an issue for me if the iOS app is not opened for a while (I am transferring workouts, so they might accumulate on the watch).

Is it possible to interact with ios devices even though app killed?

Is it possible to create an app where the message is automatically sent from one device to another when both the devices are in the same geo-location in predefined range or in the wireless points like Bluetooth?
I think there must be some way to do this. Please let me know if you have any idea about the same.
In peer-peer connection, It is not possible. When the user terminates the app everything goes with it.
But if you connect it with server, you could try to implement the behavior you are looking for with a push notification with content available, which gives you some time awake to download content in the background.

How to intercept and parse incoming calls via an app

How does Truecaller intercept incoming phonecalls on the iphone to display caller ID?
I didn't think this was possible from within the app?
Specifically, if I wanted to build this functionality, what protocols would I go about using?
http://www.truecaller.com/how-it-works
On an iPhone, without jailbreaking it:
- you cannot intercept a call in any way
- you cannot determine the phone number nor the caller ID identifying information regarding the call. Even if you could there
is no way to alter what is displayed on the call screen
- you cannot block the call
- your program can get a notification when a call is being made/terminated etc. But only if your app is executing in the
foreground at the time of the call or if the app is in the
background and has a relevant background mode (even then you can
only know there is a call in some circumstance, depending upon what
you're doing in the background and what state your in etc. Its too complex to describe the exact situation here briefly)
True Caller doesn't do that on iOS as it isn't supported with the native SDK. See their FAQ:
http://www.truecaller.com/support , specifically the "Why don't I receive live caller ID?" Section under "iPhone/Windows Phone". If you must though, try looking into a solution for jailbroken devices.
It's impossible to "intercept" calls. It is possible to handle the "background event call" when a iPhone get's a call. That said, Truecaller doesn't intercept calls. More info can be found on their website.

Register for SMS Notification

Can I register for SMS Notification through my application? All I want is to increase counter in my application when user is doing any SMS out of my application.
The sandbox nature of apps on the iOS platform prevents you from seeing what the other apps are doing. You will need to track what you are setting up with your MFMessageComposeViewController as you are helping them prepare to send an SMS message. But you can't tell if they added other recipients or deleted the ones you set up originally.
You can use the delegate to find out if the message was successfully sent, cancelled, or failed.
You get the result in messageComposeViewController:didFinishWithResult:
Nice try NSA!
Seriously though, SMS (text messaging), phone calls and e-mails are all "walled gardens" on the iPhone. This functionality belongs to the OS only, and there is little to no chance that Apple will ever open it up to developers. The other term thrown around is "sandbox" and these system level apps are in it.
Think about the potential consequences if every app could access your text's, e-mails and phone calls (even if it was just the meta-data). What kind of a world would it be when Candy Crush launched an alert the next time you played that said "We noticed you've been getting a lot of messages from Jennifer recently, would you like to invite her to play candy crush too?"

Disable all notifictions of incomming messages in Symbian S60v3

How do I programmatically disable these notifications when a message is arriving on my symbian S60v3 phone:
Message tone (I think I got that one)
The led flashing
The phone vibration
The screen lights up
The message icon (I think I got that one too)
and what SDK can I use? I prefer to use Python, but I do not think the Python SDK for Symbian is too complete, so I guess I have to be using C++
Any help is greatly appreciated, thanks
I managed to disable all notification by creating a MMsvSessionObserver and doing the following in HandleSessionEventL:
TMsvId* entryId = STATIC_CAST(TMsvId*, aArg2);
CMsvEntry* msvEntry = myMsvSession->GetEntryL(entryId);
TMsvEntry entry = msvEntry->Entry();
entry.SetNew(EFalse);
entry.SetUnread(EFalse);
entry.SetVisible(EFalse);
msvEntry->ChangeL(entry);
The bad news is that you can't rely on using the message centre APIs to watch for messages in order to handle them before user notification occurs. Often you will be able to handle them quickly enough, but on phones with faster processors the user will sometimes see some notification - either a beep, or the screen lights up etc. I used to use this method, then on the N95 the phone still beeped when an SMS arrived.
The good news is that if you are only concerned about SMS messages then there is a more reliable way of intercepting them so that the user never sees any notification. You can use a socket to receive the message before the message centre gets hold of it.
There's a worked example here:
http://symbian.devtricks.mobi/tricks/silent_receiving_of_sms_messages/
I switched my code over to something like this and found it worked much better. As far as I know there is no way to do this from Python.

Resources