<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Google &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Tue, 12 Oct 2021 15:48:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Google Switches to Native on iOS</title>
		<link>https://blog.xojo.com/2021/10/12/google-switches-to-native-on-ios/</link>
		
		<dc:creator><![CDATA[Geoff Perlman]]></dc:creator>
		<pubDate>Tue, 12 Oct 2021 15:48:14 +0000</pubDate>
				<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Native App Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=9422</guid>

					<description><![CDATA[MacRumors reported that Google's design chief for Apple platforms, Jeff Verkoeyen, announced that Google is switching from using a lot of custom controls in its iOS apps. this same device. You only get that if you use native user interface controls. That's why Xojo has always provided native user interface controls, high-level access to native system functionality and compiled to native code. ]]></description>
										<content:encoded><![CDATA[
<p>MacRumors <a href="https://www.macrumors.com/2021/10/11/google-apps-for-ios-to-switch-to-uikit/">reported</a> that Google&#8217;s design chief for Apple platforms, Jeff Verkoeyen, announced that Google is switching from using a lot of custom controls in its iOS apps such as Gmail, Google Maps, Google Photos, YouTube and others, to using Apple&#8217;s native user interface controls. The purpose of using their own controls was to provide a user experience that was unified between desktop, web and mobile. Some Google users complained (unsurprisingly) that using Google&#8217;s apps on iOS was a jarring experience compared to the rest of iOS.</p>



<p>Google is making the right move here. In the overwhelming majority of cases, the paramount issue is that the user interface is consistent with other user interface experiences the user is likely to have on this same device. You only get that if you use native user interface controls. That&#8217;s why Xojo has always provided native user interface controls, high-level access to native system functionality and compiled to native code. Native provides the best experience for the end user which is what matters most. With most development tools, doing so requires a lot of extra work for the developers but reducing that should never come at the expense of a poor user experience. Fortunately, developers don&#8217;t have to make that sacrifice with Xojo.</p>



<p>Creating the best user experience extends beyond native controls. Developers must also look at what the customary design and behaviors of apps are on the target OS. Native controls help quite a bit with this but developers still must be vigilant and dedicated to avoid degrading the user experience.</p>



<p>I applaud Jeff Verkoeyen for making this difficult but correct choice. While there are a few categories of apps where custom user interface makes sense (games, kiosk apps), for all others, native is the best choice for creating the best user experience. </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Guest Post: Adding Language Translation to Your Xojo Apps</title>
		<link>https://blog.xojo.com/2019/05/13/guest-post-adding-language-translation-to-your-xojo-apps/</link>
		
		<dc:creator><![CDATA[Tim Dietrich]]></dc:creator>
		<pubDate>Mon, 13 May 2019 10:00:17 +0000</pubDate>
				<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[App Localization]]></category>
		<category><![CDATA[CURL]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Middleware]]></category>
		<category><![CDATA[Monkeybread Software]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Translation]]></category>
		<category><![CDATA[Web Service]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=5735</guid>

					<description><![CDATA[I've been amazed at the speed and accuracy of the Amazon Translate service. And after developing the AWSTranslator class, I was able to quickly and easily add language translation to my client's middleware app.]]></description>
										<content:encoded><![CDATA[<p>Recently, I was asked by a client if it would be possible to build language translation functionality into a Xojo-based middleware solution that I had developed for them. The Xojo app obtains product information (including product names, descriptions, and other marketing-related information) from suppliers via a SOAP call, and returns the data in a JSON-encoded response. They wanted to be able to translate the product information, which is provided in English, to other languages (such as French, German, etc). The client wanted something similar to <a href="https://translate.google.com/">Google Translate</a>. However, they wanted the translation function to be built directly into the app and to be performed &#8220;on demand.&#8221;</p>
<p>I did some research and found that Amazon provides a service that does exactly what the client was asking for. The service, called <a href="https://aws.amazon.com/translate/">Amazon Translate</a>, is available as one of many services that are available through Amazon Web Services.</p>
<p>In this post, I&#8217;ll walk you through the process of getting signed up for Amazon Translate, and then share some code that you can use to add language translation to your own Xojo projects. We&#8217;ll use the MBS Xojo CURL Plugin, which makes calling the Amazon Translate API easy. But first, let&#8217;s learn a little about Amazon Translate.</p>
<p><span id="more-5735"></span></p>
<h3><b>Amazon Translate</b></h3>
<p>Amazon Translate is an API that can be used to translate text on demand. You send it text in a &#8220;source language,&#8221; tell the API what that source language is, as well as the &#8220;target language&#8221; that you want the text translated to. The API responds with the translated text.</p>
<p>Amazon Translate uses machine learning and neural networks that have been designed specifically for language translation. When performing a translation, the service reads the text one sentence at a time, and reads each word individually, to determine the meaning of a sentence. In other words, the service doesn&#8217;t just translate words. Instead, it&#8217;s acting as an interpreter. This results in translations that are extremely accurate.</p>
<p>In order to use Amazon Translate, you&#8217;ll need an <a href="http://aws.amazon.com/">AWS account</a>. If you already have an AWS account, log into the account.</p>
<p>Next, you&#8217;ll need to create an &#8220;Identity and Access Management&#8221; (IAM) user. To do so, under Services, select &#8220;IAM&#8221; (which can be found in the &#8220;Security, Identity, &amp; Compliance&#8221; category). This will present you with the IAM Dashboard.</p>
<p>Under Groups, create a new group and give it a recognizable name. For example, you might call the group &#8220;translate.&#8221; As you are creating the group, give it the &#8220;TranslateFullAccess&#8221; permission.</p>
<p>Next, create an IAM user. Under Users, click the &#8220;Add user&#8221; button. Give the user a name such as &#8220;XojoTranslater.&#8221; For the &#8220;AWS access type&#8221; be sure to select &#8220;Programmatic access.&#8221; Add the user to the &#8220;translate&#8221; group that you created above. There&#8217;s no need to assign any tags to the user, so you can skip that step.</p>
<p>And finally, create an Access key for the user. Be sure to make note of both the &#8220;Access key ID&#8221; and &#8220;Secret access key&#8221; values that are automatically assigned. You&#8217;ll need these in order to make API calls.</p>
<h3><b>The MBS Xojo CURL Plugin</b></h3>
<p>If you don&#8217;t already have the <a href="https://www.monkeybreadsoftware.de/xojo/plugin-curl.shtml">MBS Xojo CURL Plugin</a>, download it and install it. To install the plugin, simply drag it into the Xojo &#8220;Plugins&#8221; folder.</p>
<p>The project will work with an unlicensed version of the MBS Xojo CURL Plugin. In this case, you&#8217;ll occasionally see a popup message reminding you to purchase a license. However, I highly encourage you to purchase a license. You can license the plugin individually, or as part of the MBS Complete plugin bundle.</p>
<h3><b>The Xojo Example Project</b></h3>
<p>To demonstrate the Amazon Translate service, I&#8217;ve put together an example Xojo desktop project (<a href="https://s3.amazonaws.com/tdietrich-opensource/aws-translate-demo.xojo_binary_project.zip">project file</a>). Before running the application, be sure to set the three App-level properties: AWSAccessKeyId, AWSSecretAccessKey, and the AWSRegion. For the AWSAccessKeyId and AWSSecretAccessKey properties, use the values that you set when you created the Access key for the user. For the AWSRegion, refer to <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">this</a> and use the value that makes the most sense for you.</p>
<p>Once you&#8217;ve configured the app, run it, and it will look something like this.</p>
<p> </p>
<h3><b>The Xojo Code</b></h3>
<p>Let&#8217;s take a look at some of the code.</p>
<p>The AWSTranslator class is a subclass of the CURLSMBS class. The class does two important things: It provides access to a list of the languages that are supported, and provides a method for calling the Amazon Translate API.</p>
<p>The &#8220;Languages&#8221; property is a dictionary that you can use to get the names of the languages that Amazon Translate supports and the corresponding language codes. The example app uses this dictionary to populate the &#8220;Translate From&#8221; (SourcePopupMenu) and &#8220;Translate To&#8221; (TargetPopupMenu) popup menus.</p>
<p>The Translate method creates the payload that gets sent to the Amazon Translate API, and sets special HTTP headers that are needed in order to call the API. But most importantly, it uses the CURLSMBS class&#8217;s &#8220;SetupAWS&#8221; method to configure the CURL instance so that all of the steps that are required to &#8220;sign&#8221; the API request are done automatically. This is an amazingly convenient function of the MBS Xojo CURL Plugin. You can get a sense of what&#8217;s involved in signing the request <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">here</a>.</p>
<p>To translate text using the AWSTranslator class, you create an instance, configure it with your IAM credentials and AWS region, pass it the source language text, the source language code, and the target language code. In the example app, this all handled in the Window1.Translate method. The values are pulled from the App-level properties, as well as the various window controls. Finally, you call the AWSTranslator instance&#8217;s Translate method. If the translation is successful, the translated text will be available via the TranslatedText property. If any errors occur, the ErrorType and ErrorMessage properties will be set.</p>
<p>The &#8220;Estimated Translation Cost&#8221; is calculated whenever the Source Text changes. The value is calculated by taking the length (number of characters) of the Source Text and multiplying it by 0.000015 (the average cost for translating a single character).</p>
<h3><b>Wrapping Up</b></h3>
<p>I&#8217;ve been amazed at the speed and accuracy of the Amazon Translate service. And after developing the AWSTranslator class, I was able to quickly and easily add language translation to my client&#8217;s middleware app.</p>
<p>I hope you&#8217;re equally impressed by the Amazon Translate service, and that you find the AWSTranslator class to be helpful in your own Xojo projects.</p>
<p><i>Tim Dietrich is a custom software developer based in Richmond, Virginia. To learn more, visit: <a href="https://timdietrich.me/" target="_blank" rel="noopener noreferrer" data-saferedirecturl="https://www.google.com/url?q=https://timdietrich.me&amp;source=gmail&amp;ust=1552488320387000&amp;usg=AFQjCNEDiwUxo_XLnpKX-Bt3nL8FIQTxZA">https://timdietrich.me</a></i></p>


<figure class="wp-block-image"><img fetchpriority="high" decoding="async" width="1024" height="711" src="https://blog.xojo.com/wp-content/uploads/2019/05/Screen-Shot-2019-04-01-at-4.21.01-PM-1024x711.png" alt="" class="wp-image-5753" srcset="https://blog.xojo.com/wp-content/uploads/2019/05/Screen-Shot-2019-04-01-at-4.21.01-PM-1024x711.png 1024w, https://blog.xojo.com/wp-content/uploads/2019/05/Screen-Shot-2019-04-01-at-4.21.01-PM-300x208.png 300w, https://blog.xojo.com/wp-content/uploads/2019/05/Screen-Shot-2019-04-01-at-4.21.01-PM-768x533.png 768w, https://blog.xojo.com/wp-content/uploads/2019/05/Screen-Shot-2019-04-01-at-4.21.01-PM.png 1532w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Using Google Fonts in Your Web Apps</title>
		<link>https://blog.xojo.com/2017/08/23/using-google-fonts-in-your-web-apps/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Wed, 23 Aug 2017 10:00:48 +0000</pubDate>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Font]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[webdev]]></category>
		<guid isPermaLink="false">http://blog.xojo.com/?p=2860</guid>

					<description><![CDATA[Here&#8217;s a quick and free tip I found on the Xojo Forums a while back! You can use Google Fonts in your web app to make&#8230;]]></description>
										<content:encoded><![CDATA[<p>Here&#8217;s a quick and free tip I found on the Xojo Forums a while back! You can use Google Fonts in your web app to make it look snazier. There are hundreds of Google Fonts available to choose from in all kinds of styles. Read on to learn how:</p>
<p><span id="more-2860"></span></p>
<p>You can see what is available for Google Fonts here:</p>
<p><a href="https://fonts.google.com">https://fonts.google.com</a></p>
<p>Here are the <a href="http://developer.xojo.com/using-google-fonts">steps to use a Google Font</a> in your web app.</p>
<ol>
<li>Click on the name of the font to go to its page. As an example font to try, select the font called &#8220;Orbitron&#8221;.</li>
<li>On the Orbitron page, click &#8220;SELECT THIS FONT&#8221; in the top right.</li>
<li>This adds a banner at the bottom of the page that says &#8220;1 Family Selected&#8221;. Click the banner to display the full details. Make sure &#8220;Standard&#8221; is selected and copy the HTML text. For Orbitron it looks like this:
<ol>
<li>
<pre>&lt;link href="https://fonts.googleapis.com/css?family=Orbitron" rel="stylesheet"&gt;</pre>
</li>
</ol>
</li>
<li>In your Xojo web project select the App and then click the &#8220;pencil&#8221; icon next to the HTMLHeader property to show the editor. Paste the text you copied from above into the property. Leave the editor open as you have more HTML to add.</li>
<li>Go back to the Orbitron page and copy the text in the &#8220;Specify in CSS&#8221; section. For Orbitron it looks like this:
<ol>
<li>
<pre>font-family: 'Orbitron', sans-serif;</pre>
</li>
</ol>
</li>
<li>Back in Xojo, add &lt;style&gt;&lt;/style&gt; tags to the editor.</li>
<li>In between the style tags, add a period followed by the name of the Google Font and two curly brackets
<ol>
<li>
<pre>&lt;style&gt;.Orbitron {}&lt;/style&gt;</pre>
</li>
</ol>
</li>
<li>In between the curly brackets add the code you copied from above.</li>
<li>In the end you&#8217;ll have text in the editor that looks like this:
<ol>
<li>
<pre>&lt;link href="https://fonts.googleapis.com/css?family=Orbitron" rel="stylesheet"&gt;</pre>
</li>
<li>
<pre>&lt;style&gt;.Orbitron {font-family: 'Orbitron', sans-serif;}&lt;/style&gt;</pre>
</li>
</ol>
</li>
<li>Go back to Xojo can create a new Web Style. Make sure its name matches the name of the Google Font This is case-sensitive so make sure it matches exactly. For Orbitron, the Web Style should be called &#8220;Orbitron&#8221;.</li>
<li>On WebPage1, add a Label with some text and change its Style property to Orbitron.</li>
<li>Run your project. The text should appear using the Google Font.</li>
</ol>
<p>Special thanks to Michel Bujardet, Matthew Combatti and others for pointing out this technique in these forum conversations: <a href="https://forum.xojo.com/10243-google-fonts/0">Google Fonts</a>, <a href="https://forum.xojo.com/22640-styles/0">CSS Styles</a>.</p>
<p><small>References: <a href="http://developer.xojo.com/using-google-fonts">Xojo Dev Center</a>, <a href="https://fonts.google.com/">Google Fonts</a>, <a href="https://forum.xojo.com/10243-google-fonts/0">Xojo Forum</a></small></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
