Bilingual application name on blackberry with webworks - html

I'm packaging an HTML5/Javascript application with WebWorks for BlackBerry.
In the config.xml file, we can set the icon and the name to be display on the phone.
The elements to use for that purpose are:
<name>App Name</name>
<icon src="images/icon.png"/>
My problem is that my app is bilingual and I have a different name in english and in French
(ex: "Billing" in english and "Facturation" in french).
I want "Billing" to appear below the icon when the phone language is set to english and "Facturation" when the phone language is set to french.
Is there a way to do that.
Thanks

The name can also be localized:
<name>Localization Example</name>
<name xml:lang="ca">Exemple de localisation</name>
<name xml:lang="fr_FR">Exemple de localisation</name>
<name xml:lang="de_DE">Localization Probe</name>
Source: https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/Localization

Related

Share contact, html-input type

It is possible to share contact from my phone to html form (upload file), just like popular phone apps like whatsapp and etc do?
I really like how we upload images from phone, when we use <input accpet="images/*" type="file"> - it opens phone's gallery once I hit the input[type="file"].
I wonder if there is a same feature exists that opens contacts book.
I know that there are contact-files with VCF format (https://en.wikipedia.org/wiki/VCard). But can figure out if it is possible to use the format in accept field of input.
My guess is that you should use one of the next mime-types to provide users ability to upload VCards:
text/x-vcard
application/vcard (Macintosh only)
text/anytext
text/directory
application/x-versit (Eudora Plug-in)
text/x-versit (Eudora Plug-in)
text/x-vcalendar
Source.
Regarding direct access to contacts from mobile, this feature has a proposal status. Repo is https://github.com/WICG/contact-api. You can play with the feature here https://whatwebcando.today/contacts.html.
Hope these help!

What's the difference between Properties/DisplayName element and VisualElements#DisplayName attribute in .appxmanifest file

In following appxmanifest, what is the difference between
Package/Properties/DisplayName element
and
Package/Applications/Application/VisualElements#DisplayName
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
<Identity Name=""
Version=""
Publisher="" />
<Properties>
<DisplayName></DisplayName> <!-- this -->
<PublisherDisplayName></PublisherDisplayName>
<Logo></Logo>
</Properties>
<Prerequisites>
<OSMinVersion></OSMinVersion>
<OSMaxVersionTested></OSMaxVersionTested>
</Prerequisites>
<Resources>
<Resource Language="" />
</Resources>
<Applications>
<Application Id="" StartPage="">
<!-- and this -->
<VisualElements DisplayName=""
Description=""
Logo="" SmallLogo=""
ForegroundText="" BackgroundColor="">
<SplashScreen Image="" />
</VisualElements>
</Application>
</Applications>
</Package>
https://msdn.microsoft.com/en-us/library/windows/apps/br211475.aspx
Package/Properties/DisplayName
The DisplayName is the name of your app that you reserve in the store, for apps which are uploaded to the store.
This is the actual reserved name in the developer portal (= store). When you package your app for upload to the store, this will be automatically set when going through the wizard in Visual Studio.
The root element Visual Elements is how the Windows Store app is visualized on the user's pc/phone.
Package/Applications/Application/VisualElements
Describes the visual aspects of the Windows Store app: its default tile, logo images, text and background colors, initial screen orientation, splash screen, and lock screen tile appearance.
So the DisplayName property under the Visual Elements element is how the app's name is shown on the user's pc. This can be different from the name in the store (e.g. localized).
A friendly name for the app that can be displayed to users. This string is localizable; see Remarks for details.
There are two explicitly reserved words that may not be used as the DisplayName for apps uploaded to the Windows Store: "NoUIEntryPoints" and "NoUIEntryPoints-DesignMode". These identifiers are reserved for use by development tools and test suites.
Source: https://msdn.microsoft.com/en-us/library/windows/apps/br211471.aspx
I have an app in the Store that may explain this issue.
Package/Properties/Display Name element refers to the app name in the Store which is the same as what's in Dashboard. While if you change the Display Name distribute in Visual Elements, your app will be different from itself in the Store after user installs it from the Store.

The right way to use SSML with Web Speech API

Web Speech API specification says:
text attribute
This attribute specifies the text to be synthesized and
spoken for this utterance. This may be either plain text or a
complete, well-formed SSML document. For speech synthesis engines
that do not support SSML, or only support certain tags, the user
agent or speech engine must strip away the tags they do not support
and speak the text.
It does not provide an example of using text with an SSML document.
I tried the following in Chrome 33:
var msg = new SpeechSynthesisUtterance();
msg.text = '<?xml version="1.0"?>\r\n<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US">ABCD</speak>';
speechSynthesis.speak(msg);
It did not work -- the voice attempted to narrate the XML tags. Is this code valid?
Do I have to provide a XMLDocument object instead?
I am trying to understand whether Chrome violates the specification (which should be reported as a bug), or whether my code is invalid.
In Chrome 46, the XML is being interpreted properly as an XML document, on Windows, when the language is set to en; however, I see no evidence that the tags are actually doing anything. I heard no difference between the <emphasis> and non-<emphasis> versions of this SSML:
var msg = new SpeechSynthesisUtterance();
msg.text = '<?xml version="1.0"?>\r\n<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><emphasis>Welcome</emphasis> to the Bird Seed Emporium. Welcome to the Bird Seed Emporium.</speak>';
msg.lang = 'en';
speechSynthesis.speak(msg);
The <phoneme> tag was also completely ignored, which made my attempt to speak IPA fail.
var msg = new SpeechSynthesisUtterance();
msg.text='<?xml version="1.0" encoding="ISO-8859-1"?> <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/10/synthesis http://www.w3.org/TR/speech-synthesis/synthesis.xsd" xml:lang="en-US"> Pavlova is a meringue-based dessert named after the Russian ballerina Anna Pavlova. It is a meringue cake with a crisp crust and soft, light inside, usually topped with fruit and, optionally, whipped cream. The name is pronounced <phoneme alphabet="ipa" ph="pævˈloʊvə">...</phoneme> or <phoneme alphabet="ipa" ph="pɑːvˈloʊvə">...</phoneme>, unlike the name of the dancer, which was <phoneme alphabet="ipa" ph="ˈpɑːvləvə">...</phoneme> </speak>';
msg.lang = 'en';
speechSynthesis.speak(msg);
This is despite the fact that the Microsoft speech API does handle SSML correctly. Here is a C# snippet, suitable for use in LinqPad:
var str = "Pavlova is a meringue-based dessert named after the Russian ballerina Anna Pavlova. It is a meringue cake with a crisp crust and soft, light inside, usually topped with fruit and, optionally, whipped cream. The name is pronounced /pævˈloʊvə/ or /pɑːvˈloʊvə/, unlike the name of the dancer, which was /ˈpɑːvləvə/.";
var regex = new Regex("/([^/]+)/");
if (regex.IsMatch(str))
{
str = regex.Replace(str, "<phoneme alphabet=\"ipa\" ph=\"$1\">word</phoneme>");
str.Dump();
}
SpeechSynthesizer synth = new SpeechSynthesizer();
PromptBuilder pb = new PromptBuilder();
pb.AppendSsmlMarkup(str);
synth.Speak(pb);
There are bugs for this issue currently open with Chromium.
88072: Extension TTS API platform implementations need to support SSML
428902: speechSynthesis.speak() doesn't strip unrecognized tags This bug has been fixed in Chrome as of Sept 2016.
I've tried this using Chrome 104.0.5112.101 (on Linux). Didn't work. When checking the debugging console I got the message:
speechSynthesis.speak() without user activation is deprecated and will be removed
Adding a button like mentioned in The question of whether speechSynthesis is allowed to run without user interaction does work for me. At least to speak out text, not SSML formatted text though.
I have tested this, and XML parsing seems to work properly in Windows, however it does not work properly in MacOS.

how to use Speech Synthesis Markup Language?

I want to create web base text to speech app.
i am using this code but nothing happen plz help me
<?xml version="1.0"?>
<!DOCTYPE speak PUBLIC "-//W3C//DTD SYNTHESIS 1.0//EN"
"http://www.w3.org/TR/speech-synthesis/synthesis.dtd">
<speak version="1.0"
xmlns="http://www.w3.org/2001/10/synthesis"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
http://www.w3.org/TR/speech-synthesis/synthesis.xsd"
xml:lang="en-US">
<p>
<s>You have 4 new messages.</s>
<s>The first is from Stephanie Williams and arrived at <break/> 3:45pm.
</s>
<s>
The subject is <prosody rate="-20%">ski trip</prosody>
</s>
</p>
</speak>
Use a platform which supports SSML, such as:
FreeTTS/Java Web Start
Windows/SAPI
Windows Phone 8
iOS
An ePub3 reader
References
Speech for Windows Phone 8
Producing Speech Output
epub3: SSML Attributes
Using FreeTTS in a web application
SSML using Chrome TTS
How to slow down text to Speech with SSML - voice sounds distorted/warped/ghastly

To start Android Applications from website

I am a c# programmer that loves android phones knowing that I am never going to learn Java.
What I want to to is an ordinary website that starts the relevant applications from my android phone (Legend) with parameters like:
This works:
Mail - this opens the email klient with correct to=john#doe.com
href="tel:+4512345678" opens the phone with the correct digits on the screen
href="geo:something" opens google map and show you your location
This does not work:
href="sms:+4512345678, body=Hello You"
href="geo:+address" - I want to enten an adress I can navigate to...
Is the last ones possible do do or something like it?
Can you send me link or description
Help would be very appreciated
Thanks in advance
/Bo
Never say never. Java is pretty close to c#.
About your problem - check the WTAI specs.
call number
<a href="wtai://wp/mc;PHONE_NUMBER">
send sms:
<a href="sms:PHONE_NUMBER?body=MESSAGE_BODY">
open maps with given geopoint:
<a href="geopoint:latitude,longitude">
open gtalk:
<a href="gtalk:ACTION?jid=USERNAME&from_jid=YOURNAME">