Register for SMS Notification - ios

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?"

Related

How to replicate Apple mail app upload que when no connection is found

If you try to send an email using the iOS mail app when your device has no connection it will que up the message to send when the device finally finds a connection, even if the app is backgrounded. You can hear that whoosh sound when it sends the message.
Does anybody know how that app gets around the background restrictions from apple? I’ve been reading through apples documentation on background execution but I can’t see anything that lets me do anything even remotely similar. NSURLSession lets me continue an upload tasks in the background for a short period of time but nothing that lets me que up an upload if I can’t make a connection to begin with.
Is Apple able to get around this because they aren’t bound by the same restrictions as we are?
You can implement some sort of persistent retry store and use: application:performFetchWithCompletionHandler: to send it.
Apple do not state specifically when they will wake you up and give you the opportunity to send it they simply state -
When an opportunity arises to download data, the system calls this method to give your app a chance to download any data it needs.
Try to experiment with this and see if regaining connectivity calls this.

Capturing iBeacon messages for later use

have a quick question on iBeacons.
Is there a way the user can capture messages they receive when they
are in a particular range to a beacon? Lets say an iBeacon app is being used
in a retail store, the user walks close to a particular beacon and
gets a message prompt and likes it but when he walks away it goes away
and another message appears. Is there a way for the user to capture
which messages they like and look at it later on even when they are
not in the store r within range to a beacon?
Thank you very much
The iBeacon itself doesn't send any messages to the end user. It just makes a three-part numeric identifier available to the app when the iBeacon is visible through the Monitoring or Ranging APIs. Any messaging directly displayed to the user (through a text field or a notification or whatever) always originates from the app itself, in the use case you describe triggered by the iBeacon being detected.
Because the messages always originate from the app and not the iBeacon, you can simply program the app to save off any messaging for later viewing by the end user.
What you want to achieve doesn't seem to be directly related to ibeacons.
It's more about how you will design your app and features. Surely you can save any kind of messages/notifications for posterior use/visualisation. For example you can store them on a server database or locally using iOS user-defaults of your app.
The same thing happens when you receive SMS or email. An app stores them so you can see later, including the time you received and who sent you.

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

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.

Receive Notification for SMS using iPhone

I have been searching for this on Google for a while and maybe I'm not wording it right because I'm not an expert iPhone developer, but what I'm wondering is if there is some kind of notification or system event that my iPhone application I'm developing can "hook into" that will get raised whenever a text message arrives on my phone. I don't need to be able to read the message. I just need to know when a text message has arrive on my phone. If possible, I'd like to be able to get the phone number of the person sending the message. Is this possible in Objective-C/Cocoa?
No, you can't do this with the public iOS APIs.

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