VoiceService in iOS - ios

I have a question about understanding event changes in iOS when VoiceOver is enabled. I'm developing some app for blind people.
Unfortunately there is not TTS support on iOS, differently from the Mac OS SDK where you can use NSSpeechSynthesizer objects.
I found VoiceService the is not public. So, in conclusione it seems that no API for speak text is available on iOS.
The question is: How can I notify the user about data processing end?
Here is a user case: User push button, the app make some calculus/process, than should return the result. In Mac this is easy you use speakString:#"Result".
But how can I tell VoiceOver to announce the result??
Excuse me if I was too contort :-)
Thank you very much...

You could use this
if (UIAccessibilityIsVoiceOverRunning()) {
UIAccessibilityPostNotification(UIAccessibilityAnnouncementNotification,
#"Result has been computed.");
}

VSSpeechSynthesizer is available for the iOS - but it is a private API and as such will likely be rejected from the app store. However you can still make apps for private consumption.
http://iphone-dev-kitchan.blogspot.co.uk/2010/08/text-to-speech-using.html
I consider it being a Private API a bug as it makes creating accessible apps for the partially sighted for instance, harder. I have filed Bug ID #: 9451650 Bug Title: VSSpeechSynthesizer is Private
You can use FliteTTS which is free and reasonably simple to integrate, and still working in iOS5+.
https://bitbucket.org/sfoster/iphone-tts
You could also record a generic message 'Results available' as a wav file and play that. If your message is static (or is from a short list of possible results) you do not need TTS.
iOS6 VoiceOver / Accessibility was mentioned in the WWDC2012 keynote.
See previous answers here (which I have reiterated above)
How can I add NSSpeechSynthesizer Class Reference?
Is there an iPhone API that allows me to use VoiceOver directly in my app?

Related

Apple keeps rejecting app with AdMob because of bluetooth notification string not correct

Since IOS 13 came to live old 3 party APIs stopped working, In my app i needed to fix few because of that so i needed to fit it to IOS 13.
Since then Apple keeps rejecting my app because of Bluetooth user notification is not correct.
I just don't know what to write there, It is so annoying. I have to add it because of AdMobs and there is nowhere to say what to write over there.
I don't user BT in my app, it is just the AdMobs beacons that needs it probably.
I've tried:
and
And i will probably will have the same issue with the calendar message also.
When i try to remove it they demand it and then not approving it.... I understand maybe the first one but what wrong with the the second one? why is that no clear enough for them?
10x
see apple docs below: https://developer.apple.com/design/human-interface-guidelines/ios/app-architecture/requesting-permission/
Explain why your app needs the information. Provide custom text (known
as a purpose string or usage description string) for display in the
system's permission request alert, and include an example. Keep the
text short and specific, use sentence case, and be polite so people
don't feel pressured. There’s no need to include your app name—the
system already identifies your app. For developer guidance, see
Protecting the User's Privacy.
you're not explaining exactly why you need access to bluetooth. you must be specific. saying, "XYZ app needs access to bluetooth to interact with beacons to serve you location based advertisements"
something like that should do. no cutting corners, no trying to put it off on Google, just say it like it is and you'll likely pass through app approval without a problem.

UIEventSubtype missing elements

The enum UIEventSubtype (iOS UIKit Framework) contains events such as play, pause, next, seek, etc. However, the iPod Access protocol contains numerous other events, such as select, up, down and back (think iPod with clickwheel). The iPod app on iOS can receive these other events and respond accordingly (move selection up/down/back in playlists), but developer apps don't have seem access to these controls.
Does anyone know a way to receive these additional events in an iOS app (for jailbreak), other than opening the /dev/tty.iap port myself (or filing a bug report with Apple and waiting)? Perhaps there's a private framework that has what I'm looking for? I looked in the IAP framework but didn't see anything interesting.
#Victor Ronin had the right idea, in the Private Framework iPodUI I found a class IUAccessoryEventHandler containing methods like
- (void)handleDownArrowEvent;
- (void)handleUpArrowEvent
- (void)handleSelectEvent
When I hooked into them with a Theos tweak and inserted logging details, I was able to see that these methods were the ones being called when an external device was sending the commands.
Update: Unfortunately, the iPodUI framework were only available in iOS 5 and 6, according to the iPhone Wiki. Not sure if or where these methods are still available.
I don't have a ready answer for you, but since you are doing this on jailbroken device, you can use mobile substrate to inject code into iPod app and you can override UIApplication sendEvent to see all events, which it receives (including select, up, down etc).

Calling a telephone number to download Android/iPhone app

Color App for Android and iPhone can be downloaded by calling a certain number (call **COLOR (**26567)). How exactly it works? I'm interested in both the way it redirects the user on the UI level as well as the technology used.
I understand that "**" is some kind of special prefix used it US - can it be done without this prefix (i.e. by calling an typical cellphone/stationary number)?.
I am posting this question here because I believe it is related to programming. I also cannot check it as I live outside US.
The answer below is from the Developers website: http://support.color.com/home
I guess the computer-based answering machine records your number when you call it, and then sends out a text message with a direct link to the app. Quite simple and elegant solution.
How do I get Color?
The easiest way is to call *COLOR (*26567) from your device. You will instantly receive a text message with a link to download the app from the Apple App store or Android Market.

Counting missing calls on iPhone/iOS

I'm quite new at iOS app development.
I'm starting to work on an app that should in somehow be able to count the missing calls that the iPhone has registered since the app is running.
I've read that in no way Apple is going to let me intercept incoming calls, answer them, reject them, or "whatever" them, but I wonder if we are allowed to count them.
I've found some people that say it can be done (well, I knew it is possible, cause LockInfo does, for instance), but I don't know if it's attached to jailbroken iPhones only.
Anyway, as far as I have seen, it must be done with some methods related to kCTCallStatusChangeNotification from CoreTelephony.h if I'm right (as seen in http://blogs.oreilly.com/digitalmedia/2008/02/when-it-comes-to-the.html), but I coudln't find much more info about it.
Hello and welcome to iPhone Development! :) As you have already pointed out, you can be informed through a notification if a call is happening. Great! But here comes the dark side of iPhone Development:
That's the end of the road. 95% of the "Phone Functionality" of the iPhone is private API and you don't technically have access to it.
Of course, you could header-dump the private frameworks and use them anyway, but that will get your app instantly rejected from the AppStore, which wouldn't be fun for anyone.
LockInfo is an extension for jailbroken devices - those guys are known for not caring too much about Apple nor Private APIs ;) Also, as you may have seen, LockInfo isn't on the AppStore because it would've never made it that far.
So Apple, why is there CoreTelephony?
Well, it's there for some very specific reasons. I personally use it to obtain the carrier name of the device for certain country specific restrictions in my application. The notification you talked about, along with others, tend to be used by developers to prepare your app for going into an inactive state (when the call comes in, your app is put in the background), so its used to pause tasks etc... CoreTelephony has never been intended for any deep level access to the telephone system of the iPhone.
So sorry, you can't obtain the information you're looking for using public APIs.

Issues with NSURL and iPhone SDK 3.0 for placing phone calls

There is a newly introduced issue with iPhone 3.0 SDK and how it deals with the NSURL method for automatically making phone calls. It used to be that you could call a method (NSURL), pass in a string with a URL prefix (tel://, sms, etc...) and the iPhone OS would dispatch the message to the device, such as iTunes, App Store, Phone, SMS, Mail, Safari, etc... The code goes something like this:
[openURL:[NSURL URLWithString:#"tel://8005551212"]];
When the method was called the phone call would be placed automatically. With the iPhone OS 3.0 when the method is called the app pops up a dialogue box asking for confirm the phone call. This breaks several existing apps as well as one that we just pushed into the App Store for review.
Can anyone think of a fix to this issue? I'm currently at a loss for what to do and trying to decide what other ways to handle this new wrench in the works.
I blogged about this and suggested that people contact Apple and make them aware of this issue. I also recommend a fix that a friend and I were thinking about - and that is to use the same "authorization" that location aware apps have; an app knows it's location aware and asks the user if it's okay to use their location.
Again, if anyone has a fix for this issue (and that is within the realm of the iPhone SDK as to not be rejected by Apple) please let me know; I would be greatly appreciative.
Update: Julian Romero Nieto has a good description of the bug and cites the (updated) Apple documentation and shows the issue at hand. You can read his posting to Oper Radar here.
I believe this is included as a security feature - imagine an app that called a 900 number at 3am every day for 10 minutes. If you compare it to the new 'In-App Purchase' API - it's much the same.
The location API comparison is a bad example - getting the users location is a privacy concern, not a financial one.
You can't fix this issue as this is what is intended - anything you do to "fix" the issue will result in an app that won't be approved.
The user experience is considered not to be good when an app can choose to dial a number without the user's consent. It would be possible for software to dial "premium" numbers that cost the user a lot of money without them realising.
This is standard across all mobile software platforms and OS - if it just changed in OS 3.0 then this shows that it must have been an issue that initially Apple thought they could get around. However I think that Mobile Operators will have put pressure on Apple to introduce this as often then end up having to refund the user - but will have already paid out the money to the "premium" number.
I am not sure if "premium" numbers exist in the US as much as they do in Europe and that maybe the reason this is hard to understand.
The RFC for tel:// says to NOT allow autodialing of numbers via the tel: scheme.
So they have to chose between RFC compliance and breaking these few apps.
I hope the chose to ignore the RFC, at least to allow apps to keep dialing if they allow it.
I question whether this is intentional on Apple's part to push users to purchase a new iPhone if they want voice dialing - this problem breaks all of the 3rd party voice dialing apps, making them unsafe and basically useless.
Let's keep up the pressure on Apple to make this a user-configurable setting.
Perhaps you meant newly introduced feature instead of issue?
I don't think you will get Apple to remove the confirmation popup, especially if it is RFC compliance.
Lemmy quote Joel (http://www.joelonsoftware.com/items/2009/06/10c.html) regarding broken apps:
A good platform always has
opportunities for applications that
aren’t just gap-fillers. These are the
kind of application that the vendor is
unlikely ever to consider a core
feature, usually because it’s vertical
— it’s not something everyone is going
to want. There is exactly zero chance
that Apple is ever going to add a
feature to the iPhone for dentists.
Zero.
I would not want some application to make calls, send sms or even connect to internet (living in a country where unlimited mobile data plans are still far in the future) without my consent.
Certainly operator's headache when customers complain about unknown calls on bills.

Resources