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.
Related
This may be contrary to HIG...it is not standard..but it occurred to me that after a user sends feedback from withinmy app, it might be nice to flash a quick unobtrusive message "Thank you for your feedback" or something. I don't want to hit the user with a full blown alert. But a discreet notification banner along the top might be nice.
Is it possible to do this or is it disallowed?
Thanks for any suggestions.
If this notification is initiated from an action from within your app, an Apple notification may not be necessary. You want to simply show a thank you message, so it doesn't even have to wait for a response from a server, but you may want to check if you have Internet connectivity, just to be able to say that the message couldn't be sent, and offer the option to retry.
These are good options for a Toast-style alert that Android uses and is unobtrusive:
https://www.cocoacontrols.com/controls/toast
https://github.com/scalessec/Toast
You can configure it to slide in from the top or bottom. And, it slides away without user interaction.
Local notification will be received in this case but will not be displayed as you want it. However you can make a custom view similar to iOS view. Also please check https://github.com/OpenFibers/OTNotification
Unless the notification is from other application in background,
your currently active app has every right and responsibility in interacting with user with any types of visuals.
There are no class from iOS SDK to allow you to use the same notification banner used for Push Notification. To achieve the same result while your app is active, you may need to adopt your own solution or a module.
I was wondering if it was possible to play a continues sound in my Skype like application when a user is called an the other user has the app installed but the app is in the background in the moment.
It would be really awesome if it could could show an "accept / decline" on the lock screen. But that might not be possible is it?
I have looked around on the internet, but I could not find it. (I think I saw something related to this on a keynote once, but that might just be my memory hoping it exists.)
That is possible to show an "accept / decline" on lock screen or notification itself. The only thing that is not possible to do is to make input field for quick response (as it's done in Messages app)
There is nice guide to interactive notifications for iOS8.
To play sound i suggest you to use possibilities provided by UILocalNotification instead of implementing custom sound/vibration.
Also, if your app is in background, it must use push notifications, so for VoIP apps i suggest you to take a look into PuskKit framework and special type of pushes - VoIP pushes
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?"
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.
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.