Emphasis tag breaks view on mobile - actions-on-google

I'm looking for help/feedback from the Google team on the <emphasis> tag. I tried to use it to emphasize choices a user can make.
"<speak> Would you like to listen to <emphasis level="moderate"> this </emphasis> or <emphasis level="moderate"> that? </emphasis></speak>"
This broke the speech output, as a quick fix for speech, I wrapped the whole string in a emphasis tag with a low level.
For reference: "<speak> <emphasis level="low"> Would you like to listen to <emphasis level="moderate"> this </emphasis> or <emphasis level="moderate"> that? </emphasis></emphasis></speak>"
On a mobile phone, though, the <emphasis> tag adds a new line before and after any string that is emphasized. There probably is a workaround for this on my side, but I also wanted to report this as a bug.
The output that I get on a mobile phone looks like this:
"Would you like to listen to
this
or
that?"

It sounds like you're sending this back either as text or as text-to-speech. If you send it back using SSML with the appropriate <speak> tag surrounding it, it should work. So it might look something like
<speak>
Would you like to listen to <emphasis level="strong"> this </emphasis> or <emphasis level="strong"> that? </emphasis>
</speak>
You should also make sure that you're sending it back using the ssml field and not the textToSpeech field or anything similar.

Related

Google Home Incorrectly pronouncing the word "resume"

I'm developing a new action that sends the word "resume" (as in pause/play/resume) to be spoken. When this happens Google Home will pronounce the word as "résumé".
I know SSML supports the tag to handle pronunciations but it doesn't look like that is implemented currently with Google Home.
Worst-case I could hack the text to be "re zoom", but I'd rather find a more elegant solution. Ideas?
This isn't an ideal solution, but you can use the <sub> tag for SSML to simulate the correct pronunciation. Try something like:
<sub alias="re zoom">resume</sub>

Best way to hide content from UIWebview?

I have a UIWebView into a mobile website that I run, and would like to hide some links when it's seen by the WebView--but not mobile Safari. It seems like there's several approaches to this:
Evaluate custom Javascript to hide elements of a certain class.
Pass in a GET parameter so that the server does it.
Pass in a custom header so that the server does it.
Maybe something else...
To me it seems like they all have their tradeoffs. What's the best way of doing it?
If you want to do this, I'd say detecting the UA with JavaScript is probably the way to go because it will be added automatically, and you can concentrate on the website, rather than having to add code to both.
Also, you don't have to check every time a link is clicked to add a custom header or GET parameter.
What I do to make the distinction between UIWebview and mobile Safari is using the userAgent (a custom one for the webView). Based on the UserAgent I display different content for each "platform"

Facebook Comment Code - What is it?

Recently I've seen some people using a string of code in their comment or wall post in order to do something interesting, such as hyperlinking the whole text. It looks quite fun though, but I don't know whether it's Facebook-defined code or any kind of language behind.
For example: ##+[0:[158038637615605:0: YOUR TEXT HERE ]]
I guess the number 158038637615605 could be an app's ID.
Any idea?
The code seems to be how Facebook is able to encode links in text without having to store any additional meta data. I assume they expect the format to be so strange as to not occur in a persons normal updates. The syntax was probably released by an engineer, or gleamed by someone examining the JavaScript operations as a user goes about tagging something.
A similar thing I've been seeing goes along the lines of:
Your phone has a name. To figure it out, you take the last three digits of your phone number - for example 635 and type it the comment section of this post like #*[635:0] and then remove the * and post, and you get your phone's name.
I suspect they're making exceptions now to prevent the user from typing it manually.
Site note; 158038637615605 seems to be the ID of a Facebook page.

Like Box for Group

I would like the Like Box on our website. However creating this in combination with a group seems not possible.
Does anyone know how to create a Like Box for a group? Creating a page would make things more confusing and means double work.
It doesn't look like you can make a Like box for a group.
I tried putting a group url into
Like buttons work
As will a Facepile
The Live Stream and Activity Stream, however, do not.
Good luck!

create hyperlink in sms in iPhone

Is it possible to create a hyperlink in an sms in an iPhone?
For example, if I want the word 'foo' hyperlinked in HTML then I'll write foo in a normal situation.
If I want to have a certain word in my sms to be hyperlinked to something, is there any way I can do this? Like "I have a surprise for you" and the receiver taps on the hyperlinked word 'surprise' which will take the user to the destined page.
Any suggestions as to how this can be done? Examples and samples welcome!
Thanks in advance :)
No, you cannot use html tags in sms / text messages. All you can do is insert the URL without the tag. It then depends on the receivers device whether the URL is presented to the user as link or as plain text.
I experimented with exactly this just yesterday. It seems you can't include a nicely formatted hyperlink, unfortunately. I hope to be proven wrong by somebody else, though :-)
However, as you've probably seen yourself, iPhone is able to recognize an URL and you can tap on it to open the URL in Safari (or tap the disclosure button next the message to get more options on what to do with the URL). As far as I can tell the only thing you can do is format your SMS accordingly: "I have a surprise for you: http://foo.com" even though that might spoil the surprise ;-)
No, you can't do this due to privacy issues. Apple thinks that giving you this ability would allow you to link users to malware and such. Sorry!
i don't think it's possible to create hyperlinks in SMS.
The only way is to send an URL, and the iPhone will convert it to a link...
Use a tiny url from tinyurl.
It doesn't allow you to do exactly what you are wanting but it at least can be used to cover up the long link.
This is the closest thing I figure out to do. I was wanting to use the "
No, you can not do this. However you could use tinyurl and format it like this
http://whateverYouWantToSay#tinyurl.com
Web browsers usually ignore anything before an # therefore you could effectively hide the actual site being linked to, as long as your friend does not know that.
What actually happens is the data before the # is submitted to the web site in the form username:password. However it must be a site that requires authentication to access, or the site will normally just ignore it.
If this helps, I've noticed that a custom hyperlink is possible on the OS X Messages app, but they have to be copied and pasted. To replicate this right click on a hyperlink in your browser and hit copy link. Then paste into Messages.
Uhhh this is possible here is a screenshot of an example - I copied a link from email and pasted in a new SMS - though it appears you cannot type html to create a link....