<?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>Android &#8211; Xojo Programming Blog</title>
	<atom:link href="https://blog.xojo.com/category/cross-platform/android/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.xojo.com</link>
	<description>Blog about the Xojo programming language and IDE</description>
	<lastBuildDate>Thu, 02 Apr 2026 18:08:59 +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>More New Features for Android: MobileChart, MobileColorPicker, MobilePDFViewer &#038; Zip/Unzip</title>
		<link>https://blog.xojo.com/2026/03/31/more-new-features-for-android/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 31 Mar 2026 15:22:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[2026r1]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Unzip]]></category>
		<category><![CDATA[Zip]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16035</guid>

					<description><![CDATA[The first release of 2026 brings some notable new features to Xojo’s Android support. You’ll find new charting, color-picking, PDF viewing, and file-zip utilities, plus&#8230;]]></description>
										<content:encoded><![CDATA[
<p>The first release of 2026 brings some notable new features to Xojo’s Android support. You’ll find new charting, color-picking, PDF viewing, and file-zip utilities, plus ongoing improvements to several controls. Here’s a quick tour of what’s new.</p>



<h2 class="wp-block-heading"><strong>MobileChart</strong></h2>



<p>Matching the features available for iOS, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilechart.html#mobilechart" target="_blank" rel="noreferrer noopener">MobileChart</a> lets you create a wide variety of charts to show in your Android app.</p>



<figure class="wp-block-image size-large is-resized"><img fetchpriority="high" decoding="async" width="483" height="1024" src="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-483x1024.png" alt="" class="wp-image-16036" style="width:198px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-483x1024.png 483w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-142x300.png 142w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-768x1628.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x-725x1536.png 725w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.19.47@2x.png 918w" sizes="(max-width: 483px) 100vw, 483px" /></figure>



<h2 class="wp-block-heading"><strong>MobileColorPicker</strong></h2>



<p>This new control, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilecolorpicker.html#mobilecolorpicker" target="_blank" rel="noreferrer noopener">as its name suggests</a>, lets you use the system color picker to select a color.</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="481" height="1024" src="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-481x1024.png" alt="" class="wp-image-16038" style="width:202px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-481x1024.png 481w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-141x300.png 141w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-768x1634.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x-722x1536.png 722w, https://blog.xojo.com/wp-content/uploads/2026/03/CleanShot-2026-03-24-at-13.21.46@2x.png 912w" sizes="(max-width: 481px) 100vw, 481px" /></figure>



<h2 class="wp-block-heading"><strong>MobilePDFViewer</strong></h2>



<p>Last year Android added <a href="https://documentation.xojo.com/api/pdf/pdfdocument.html#pdfdocument" target="_blank" rel="noreferrer noopener">PDFDocument</a> support for creating your own PDFs, and now we’ve added <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilepdfviewer.html#methods" target="_blank" rel="noreferrer noopener">MobilePDFViewer</a> to give you an easy way to show PDF document files from your Android apps.</p>



<h2 class="wp-block-heading"><strong>Zip/Unzip</strong></h2>



<p>The FolderItem class now supports the <a href="https://documentation.xojo.com/api/files/folderitem.html#folderitem-zip" target="_blank" rel="noreferrer noopener">Zip</a> and <a href="https://documentation.xojo.com/api/files/folderitem.html#folderitem-unzip" target="_blank" rel="noreferrer noopener">Unzip</a> methods to make it simple to compress and uncompressed Zip files.</p>



<h2 class="wp-block-heading"><strong>Android Keeps Getting Better</strong></h2>



<p>There are also improvements to <a href="https://documentation.xojo.com/api/user_interface/mobile/mobiletabpanel.html#mobiletabpanel" target="_blank" rel="noreferrer noopener">MobileTabPanel</a>, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobiletextarea.html#mobiletextarea" target="_blank" rel="noreferrer noopener">MobileTextArea</a>, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobileslider.html#mobileslider" target="_blank" rel="noreferrer noopener">MobileSlider</a>, <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilescrollablearea.html#mobilescrollablearea" target="_blank" rel="noreferrer noopener">MobileScrollableArea</a>, <a href="https://documentation.xojo.com/api/hardware/barcode.html#barcode" target="_blank" rel="noreferrer noopener">Barcode</a> and more. With each release, Android gets closer to feature parity with iOS!</p>



<p>And of course, we continue to squash framework and compiler bugs.</p>



<p>Be sure to check out the full <a href="https://documentation.xojo.com/resources/release_notes/2026r1.html" target="_blank" rel="noreferrer noopener">release notes</a> for all the details!</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Custom Control Rendering with DrawControlInLayoutEditor</title>
		<link>https://blog.xojo.com/2026/03/31/custom-control-rendering-with-drawcontrolinlayouteditor/</link>
		
		<dc:creator><![CDATA[William Yu]]></dc:creator>
		<pubDate>Tue, 31 Mar 2026 15:22:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[2026r1]]></category>
		<category><![CDATA[DrawControlInLayoutEditor]]></category>
		<category><![CDATA[IDE]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=16045</guid>

					<description><![CDATA[One of the notable additions in Xojo 2026 Release 1 is that the&#160;DrawControlInLayoutEditor&#160;event is now available for Desktop and iOS/Android projects, giving you more possibilities&#8230;]]></description>
										<content:encoded><![CDATA[
<p>One of the notable additions in Xojo 2026 Release 1 is that the&nbsp;<code>DrawControlInLayoutEditor</code>&nbsp;event is now available for Desktop and iOS/Android projects, giving you more possibilities over how your controls appear in the layout editor.</p>



<p>With this feature you can provide custom drawing for a control at design time, making it easier to visualize your UI without running the project.</p>



<p>If this sounds familiar, it&#8217;s because it brings Desktop and iOS/Android projects closer to what&#8217;s already possible in Web projects with&nbsp;<code>WebSDKUIControl</code>, where custom layout rendering has been available for some time.</p>



<h4 class="wp-block-heading">Why this matters</h4>



<p>Previously your custom Canvas controls would appear as generic placeholders, making it difficult to understand how they would look at runtime. Now you can:</p>



<ul class="wp-block-list">
<li>Render a preview of your control directly in the layout editor</li>



<li>Display dynamic or state-based visuals</li>



<li>Make custom controls much easier to work with at design time</li>
</ul>



<h4 class="wp-block-heading">How it works</h4>



<p>For Desktop projects, you can subclass&nbsp;<code>DesktopUIControl</code>&nbsp;and implement the&nbsp;<code>DrawControlInLayoutEditor</code>&nbsp;event. Your drawing code is executed by the IDE as it renders the control in the layout. For iOS and Android projects, this event is available on&nbsp;<code>MobileUIControl</code>.</p>



<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> You can also use this event directly with&nbsp;<code>DesktopCanvas</code>&nbsp;and&nbsp;<code>MobileCanvas</code>&nbsp;controls, so you can start drawing in&nbsp;<code>DrawControlInLayoutEditor</code>&nbsp;without needing to subclass anything.</p>



<p>This event gives you the flexibility to draw whatever you need—shapes, text, or even simplified representations of runtime content. For example, a custom media player control could display a play button and timeline, or a chart control could render a sample graph.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="661" src="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-3.03.15-PM-1024x661.png" alt="" class="wp-image-16049" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-3.03.15-PM-1024x661.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-3.03.15-PM-300x194.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-3.03.15-PM-768x496.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-3.03.15-PM-1536x991.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-24-at-3.03.15-PM-2048x1322.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h4 class="wp-block-heading">A note about XojoScript limitations</h4>



<p>One important detail to keep in mind is that&nbsp;<code>DrawControlInLayoutEditor</code>&nbsp;runs using XojoScript. This allows the IDE to safely execute your drawing code at design time, but it also means not everything you&#8217;d typically expect to use in Xojo is available, especially when it comes to the graphics APIs.</p>



<p>In practice, most common drawing operations—such as shapes, lines, and text—work as expected. However, in some cases these graphics calls use a slightly different API, as is the case with <code>LinearGradientBrush</code>.</p>



<p><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Also, because this runs as XojoScript, you cannot call other methods from within your <code>DrawControlInLayoutEditor</code>code. To access your control&#8217;s properties, you&#8217;ll need to use the built-in  <code>ColorProperty</code>, <code>BooleanProperty</code>, <code>IntegerProperty</code>, <code>DoubleProperty</code>, and <code>StringProperty</code> methods.</p>



<h4 class="wp-block-heading">Support for more Graphics</h4>



<p>In 2026r1, we&#8217;ve expanded the graphics capabilities available to&nbsp;<code>DrawControlInLayoutEditor</code>, building on what was previously supported for&nbsp;<code>WebSDKUIControl</code>. New additions include support for:</p>



<ul class="wp-block-list">
<li>LinearGradientBrush, PictureBrush, and ShadowBrush</li>



<li>LineDash, LineDashOffset, LineCap, LineJoin, and MiterLimit</li>



<li>Outline</li>



<li>Scale, Rotate, and Translate</li>



<li>SaveState, RestoreState</li>



<li>Color constants (Red, Green, Blue, Yellow etc.)</li>
</ul>



<p>Since XojoScript does not support the&nbsp;<code>Pair</code>&nbsp;type, the&nbsp;<code>LinearGradientBrush</code>&nbsp;API was adapted slightly:</p>



<pre class="wp-block-code"><code>Class LinearGradientBrush

  Sub Constructor()

  Sub AddStop(stop As Double, c As Color)

  Property StartPoint As Point
  Property EndPoint As Point

End Class</code></pre>



<p>The main difference is how the brush is constructed and how stops are added, without needing&nbsp;<code>Pair</code>. With this new API, you can turn a basic graph into something much more visually appealing.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="661" src="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-25-at-3.00.07-PM-1024x661.png" alt="" class="wp-image-16075" srcset="https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-25-at-3.00.07-PM-1024x661.png 1024w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-25-at-3.00.07-PM-300x194.png 300w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-25-at-3.00.07-PM-768x496.png 768w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-25-at-3.00.07-PM-1536x991.png 1536w, https://blog.xojo.com/wp-content/uploads/2026/03/Screenshot-2026-03-25-at-3.00.07-PM-2048x1322.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h4 class="wp-block-heading">Turning off this feature</h4>



<p>While many may prefer custom rendering for custom controls, it can become a bottleneck when a large number of controls are rendering content. If you prefer a less resource-intensive experience, you can disable this behavior in Settings → Layout by enabling the Static Rendering option.</p>



<h4 class="wp-block-heading">Finally</h4>



<p>With&nbsp;<code>DrawControlInLayoutEditor</code>&nbsp;now available for Desktop and Mobile projects, you can take advantage of the same benefits Web projects have enjoyed for years. Be sure to check out the new DrawControlInLayoutEditor example project, adapted from the WebSDK → CustomButton example. We hope you enjoy designing and previewing your custom controls with this new event—and yes, it also works in Libraries!</p>



<p><em><em><em>William Yu grew up in Canada learning to program BASIC on a Vic-20. He is Xojo’s resident Windows and Linux engineer, among his many other skills. Some may say he has joined the dark side here in the USA, but he will always be a Canadian at heart.</em></em></em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Hide the Tabs in an Android MobileTabPanel Using Declares</title>
		<link>https://blog.xojo.com/2025/09/25/hide-the-tabs-in-an-android-mobiletabpanel-using-declares/</link>
		
		<dc:creator><![CDATA[Martin T.]]></dc:creator>
		<pubDate>Thu, 25 Sep 2025 16:47:58 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Declares]]></category>
		<category><![CDATA[PagePanel]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15409</guid>

					<description><![CDATA[Here’s how you can modify Xojo Android’s MobileTabPanel to behave more like the PagePanel found in Xojo Desktop and Web. A TabPanel, as the name&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Here’s how you can modify Xojo Android’s MobileTabPanel to behave more like the PagePanel found in Xojo Desktop and Web. A TabPanel, as the name suggests, shows tabs for the panels, while a PagePanel does not. Using PagePanel can be very useful in situations where you need greater freedom in designing your UI. With just a few lines of code, you can use Declares to turn a MobileTabPanel into a PagePanel on Android. Read on to see how.</p>



<p>Create a new Android project with two container controls in the IDE, to which you add some controls. Then switch back to Screen1 in the Navigator and add a MobileSegmentedButton and a MobileTabPanel. In the Inspector, set the locking for the TabPanel to all four sides and assign both container controls to the TabPanel via the Inspector. Those are the basic preparations.</p>



<p>The MobileTabPanel is a subclass of Android’s <a href="https://developer.android.com/reference/com/google/android/material/tabs/TabLayout" target="_blank" rel="noreferrer noopener">TabLayout</a> view (com.google.android.material.tabs.TabLayout). This consists of the tabs themselves and a so-called ViewPager that holds the containers.</p>



<p>First, we remove the top tab bar from the control. After that, we update the position of the area where the containers are displayed. Then we disable the swipe gesture (optional). And that’s it. </p>



<p>Now add the Opening event to TabPanel1. First, we add two Android-specific import Declares so that the following Declares don’t take up too much space and readability is maintained:</p>



<pre class="wp-block-code"><code>Declare Sub import1 Lib "android.view.*:Import"
Declare Sub import2 Lib "android.widget.*:Import"</code></pre>



<p>Next, we remove the tab bar from the control:</p>



<pre class="wp-block-code"><code>' Removes the tab bar from the MobileTabPanel.
Declare Function RemoveTabs Lib "Kotlin" Alias "(ref as ViewGroup).apply { visibility = View.GONE }" (ref As Ptr) As Ptr
Call RemoveTabs(Me.Handle)</code></pre>



<p>After that, we adjust the top position of the ViewPager by setting it to 0:</p>



<pre class="wp-block-code"><code>' Update control bounds.
Declare Function GetLayoutParams Lib "Object:Me:MobileTabPanel" Alias "_tabPager!!.layoutParams" As Ptr
Declare Function UpdateLayoutParams Lib "Kotlin" Alias "(ref as FrameLayout.LayoutParams).apply { topMargin = 0 }" (ref As Ptr) As Ptr
Call UpdateLayoutParams(GetLayoutParams)</code></pre>



<p>Now add the Pressed event to the MobileSegmentedButton with this code, which ensures switching between the panels:</p>



<pre class="wp-block-code"><code>TabPanel1.SelectedPanelIndex = segmentedIndex</code></pre>



<p>And that’s it – click Run to start the project.</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="912" height="1024" src="https://blog.xojo.com/wp-content/uploads/2025/09/9F36A412-1902-449D-A3DD-FD062BCA4BC9-912x1024.png" alt="" class="wp-image-15411" style="width:616px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2025/09/9F36A412-1902-449D-A3DD-FD062BCA4BC9-912x1024.png 912w, https://blog.xojo.com/wp-content/uploads/2025/09/9F36A412-1902-449D-A3DD-FD062BCA4BC9-267x300.png 267w, https://blog.xojo.com/wp-content/uploads/2025/09/9F36A412-1902-449D-A3DD-FD062BCA4BC9-768x862.png 768w, https://blog.xojo.com/wp-content/uploads/2025/09/9F36A412-1902-449D-A3DD-FD062BCA4BC9-1369x1536.png 1369w, https://blog.xojo.com/wp-content/uploads/2025/09/9F36A412-1902-449D-A3DD-FD062BCA4BC9-1825x2048.png 1825w" sizes="auto, (max-width: 912px) 100vw, 912px" /></figure>



<p><br>To make the control feel even more like a PagePanel, we now want to eliminate the ability to switch between panels with swipe gestures. To do this, go back into the TabPanel1 Opening event and add this code:</p>



<pre class="wp-block-code"><code>' Disable swipe.
Declare Sub setUserInputEnabled Lib "Object:Me:MobileTabPanel" Alias "_tabPager!!.setUserInputEnabled" (value As Boolean) setUserInputEnabled(False)</code></pre>



<p>And that’s it: the control is now a PagePanel – without tabs and within the same bounds as the TabPanel.</p>



<p>Here you can see the PagePanel in action.</p>



<div class="wp-block-media-text is-stacked-on-mobile is-vertically-aligned-top" style="grid-template-columns:37% auto"><figure class="wp-block-media-text__media"><video controls src="https://blog.xojo.com/wp-content/uploads/2025/09/pagepanel-1.mp4"></video></figure><div class="wp-block-media-text__content">
<p></p>
</div></div>



<p>Once you know where and what to look for in the Android API, there’s almost nothing you can’t already do with Declares in Xojo Android. But if you are looking for a native solution, you can join my <a href="https://tracker.xojo.com/xojoinc/xojo/-/issues/79929" target="_blank" rel="noreferrer noopener">feature request</a> to implement MobilePagePanel on Android.  </p>



<p>Happy Coding!</p>



<p><em>Martin T. is a Xojo MVP and has been very involved in testing Android support.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2025/09/pagepanel-1.mp4" length="2676015" type="video/mp4" />

			</item>
		<item>
		<title>Spotlight On: Android Design Extensions</title>
		<link>https://blog.xojo.com/2025/09/22/spotlight-on-android-design-extensions/</link>
		
		<dc:creator><![CDATA[Alyssa Foley]]></dc:creator>
		<pubDate>Mon, 22 Sep 2025 16:00:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Android Design Extensions]]></category>
		<category><![CDATA[Spotlight On]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15129</guid>

					<description><![CDATA[Spotlight On posts focus on Xojo community members. We’ll use this space to tell the stories of people using Xojo, share amazing Xojo-made apps and&#8230;]]></description>
										<content:encoded><![CDATA[
<p><em>Spotlight On posts focus on Xojo community members. We’ll use this space to tell the stories of people using Xojo, share amazing Xojo-made apps and spread awareness of community resources. If you have an app, a project or a person you want to see featured in Spotlight On,&nbsp;<a href="mailto:hello@xojo.com" target="_blank" rel="noreferrer noopener">tell us about it</a>!</em></p>



<p>Martin started using Xojo around the time he got his first MacBook. He was drawn to Xojo’s simplicity and flexibility. If you ask him, Martin will say designing clean, intuitive user interfaces is one of his favorite parts of development. Though he&#8217;s also a Xojo MVP, he&#8217;s probably best know as the developer behind <a href="https://github.com/XojoGermany/AndroidDesignExtensions" target="_blank" rel="noreferrer noopener">Android Design Extensions</a>.</p>



<h3 class="wp-block-heading"><strong>Mac, Windows or Linux?</strong></h3>



<p>Mac.</p>



<h3 class="wp-block-heading">How would you explain your most recent project to a new developer?</h3>



<p>The Android Design Extensions are a collection of enhancements for Android projects in Xojo, aimed at polishing the UI of your apps. This is the primary focus of the project. It addresses aspects that Xojo does not natively provide.</p>



<p>We live in a visual world—design in advertising and product presentation shapes users’ impressions of a company or product. The same applies to software. Is the UI user-friendly and visually appealing? Is it enjoyable to use the app? These questions have always been the guiding principles behind the creation of the Android Design Extensions.</p>



<h3 class="wp-block-heading">What do you think Martin from 2020 would think about what you do now?</h3>



<p>Five years ago, I could never have imagined that I would be a Xojo MVP and be able to make my own project available to other users. Android Design Extensions is the result of many hundreds of hours of intensive collaboration with the Xojo team, which has resulted in Xojo Android becoming more stable and, above all, enormously powerful. For example, in terms of declares, it&#8217;s really easy and there&#8217;s hardly anything now that you can&#8217;t implement in Android projects, as long as you know how to read the Android API and handle declares.</p>



<p>That&#8217;s almost the best memory of the last five years, that Xojo has listened to feedback from Android users and responded very quickly. It&#8217;s amazing how fast Android support in Xojo has progressed over the past two years. </p>



<h3 class="wp-block-heading">What is on your &#8220;Learn Next&#8221; list?</h3>



<p>Definitely delve deeper into Android APIs to explore the possibilities of Xojo Android even more.</p>



<h3 class="wp-block-heading"><strong>How did you find Xojo? And when did you start using Xojo?</strong></h3>



<p>I first came into contact with Xojo around 2008. At that time it was still called Real Studio and I had found it on a DVD that was enclosed with a computer magazine. I was an active Delphi developer at the time and immediately fell in love with the simplicity of the language.</p>



<h3 class="wp-block-heading"><strong>What do you build with Xojo now?</strong></h3>



<p>Fortunately, I have greatly expanded my programming skills thanks to Xojo. My focus is on UI development, controls, especially the TextInputCanvas, Android and desktop programs.</p>



<h3 class="wp-block-heading"><strong>What is something you worked on that you want to talk about?</strong></h3>



<p>I became very friendly with TextInputCanvas (a free plugin) and together with Björn Eiríksson from Einhugur, we created an updated API 2.0 version of the plugin, which we still maintain today.</p>



<p>I used to work as a developer for Bob Keeney and was responsible for the Formatted Text Control, which is based on TextInputCanvas. There are several programs on the market that make intensive use of this control and I am still involved in some of these projects today, making the WYSIWYG experience even more pleasant for customers when entering text.</p>



<h3 class="wp-block-heading"><strong>Do you use Xojo for any hobbies?</strong></h3>



<p>I also use Xojo to write software for genealogical purposes. From a young age, I developed a curiosity and desire to learn more about the history of my family and its members. That is how I came to genealogy. It is a kind of detective work that can lead to surprising family connections, secrets, strokes of fate, and even unknown relatives. Since I enjoy reading, I prefer to have such information in book form and written out, rather than in tables. A book with text feels more tangible to me—something the reader can engage with more consciously.</p>



<p>None of the genealogy software available on the market has ever met my expectations. That is why I wrote my own software in Xojo, which can process the standard format for genealogical data known as Gedcom. You can think of it as a database in plain text format. From this data, I can then generate—depending on what is desired—full biographies, ancestor and descendant trees, and more. The finished result is a Word document, complete with indices at the end for all people, places, professions, and so on—just like in a real book.</p>



<p><em>Thank you to Martin T. for answering questions and sharing his Xojo experience with the community. Martin accepts <a href="https://www.paypal.com/paypalme/MTrippensee" target="_blank" rel="noreferrer noopener">donations</a> for his work on Android Design Extensions. Download <a href="https://github.com/XojoGermany/AndroidDesignExtensions" target="_blank" rel="noreferrer noopener">Android Design Extensions</a>.</em> <em>Read more about Android Design Extensions on the <a href="https://blog.xojo.com/tag/android-design-extensions/" target="_blank" rel="noreferrer noopener">Xojo Blog</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Xojo for Android: A Two-Year Retrospective</title>
		<link>https://blog.xojo.com/2025/09/16/xojo-for-android-a-two-year-retrospective/</link>
		
		<dc:creator><![CDATA[Xojo]]></dc:creator>
		<pubDate>Tue, 16 Sep 2025 20:56:38 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Android Design Extensions]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15375</guid>

					<description><![CDATA[Xojo 2023r2 was the version in which Xojo introduced the beta release of its Android support. Now, with the release of Xojo 2025r2, it’s time&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Xojo 2023r2 was the version in which Xojo introduced the beta release of its Android support. Now, with the release of Xojo 2025r2, it’s time to take a look at what has happened over the past two years regarding Android development. With some distance from the initial launch, it’s clear that the wait was worth it. Xojo’s decision to use a Kotlin-based framework in combination with a transpiler in the background has turned out to be a smart move. Why? Because depending on the use case and the developer’s experience, there are now very few limitations to what can be done with Android projects in Xojo—if you know how to achieve it.</p>



<p>Most of the development effort over the past two years was certainly spent fixing compiler errors. In 2023 and 2024, the framework was still encountering errors during app builds. Since then, the situation has improved significantly—thanks in large part to hundreds of issues submitted by users. Example projects were particularly helpful for the Xojo team in identifying and fixing bugs. It’s always important to show Xojo how we as users work with the IDE and write our code, as our approaches often differ and expose edge cases that Xojo doesn’t cover out of the box. The past two years have therefore also helped Xojo better understand how developers actually use the product.</p>



<p>The initial Android beta in 2023 included a basic set of UI controls. Over time, four more were added: MobilePopupMenu, AndroidMobileUserControl, MobileMapViewer, as well as classes like Barcode, TCPSocket, and UserAuthentication. This brings the Android target closer to the iOS feature set, with the long-term goal of enabling unified mobile projects that can build for both platforms. However, some steps are still needed to reach that point. The Android framework itself has seen substantial improvements over the past two years. Several new classes were added to enhance the developer and user experience compared to other platforms: RegEx, Set, ColorGroup, structures, localization, dark mode support, and more.</p>



<p>I asked Paul Levebvre, the lead developer of the Android framework, what the most challenging moments over the last two years were for him: “It may have been only two years, but I feel like I’ve aged 10! I am pleased with the forward progress and it’s always great to see the amazing things that people have created with Xojo for Android. The hardest thing to get working—by a wide margin—was the debugger. Nothing else comes close. In the past two years, the most difficult things have probably been TCPSocket, Operator_Convert, ColorGroup, MapViewer, and ByRef. Right now, the plan is to continue fixing bugs and adding features to get Android to feature parity with iOS.”</p>



<p>The development of the Android Design Extensions began early in the public alpha phase of Xojo Android. This close integration led to numerous improvements and enhancements in the Android Declare engine. Today, there’s practically nothing you can’t implement on Android using Declares, even native controls—provided there’s no built-in Xojo support yet. Naturally, this does require some knowledge of the Android API and the Kotlin programming language. With the help of the <a href="https://github.com/jkleroy/iOSDesignExtensions">Android Design Extensions</a>, you can further enhance your apps, much like you might already do in your iOS projects using <a href="https://github.com/jkleroy/iOSDesignExtensions">Jérémie Leroy’s iOS Design Extensions</a>. </p>



<p>Of course, there’s still a lot of work to be done to bring Android up to the same level as iOS. For example, support for custom attributes and AttributeInfo is still missing, along with several control-specific features, the DatabaseConnection class, XML handling, PDFDocument, and more. It’s important that we test thoroughly and cover as many edge cases as possible to make Android support truly stable—and to ensure that the full Xojo language feature set works as expected. As a welcome side effect, the Xojo documentation has also improved significantly through this extensive testing. Encouraging, indeed.</p>



<p><em>Martin T. is a Xojo MVP and has been very involved in testing Android support.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>It’s here &#8211; Android Design Extensions 4.0</title>
		<link>https://blog.xojo.com/2025/07/08/its-here-android-design-extensions-4-0/</link>
		
		<dc:creator><![CDATA[Martin T.]]></dc:creator>
		<pubDate>Tue, 08 Jul 2025 21:20:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Android Design Extensions]]></category>
		<category><![CDATA[MobileMapViewer]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=15123</guid>

					<description><![CDATA[Xojo 2025r2 has just been released—time for an update to the Android Design Extensions 4.0, which are compatible with all Xojo 2025r2+ versions. With the&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Xojo 2025r2 has just been released—time for an update to the Android Design Extensions 4.0, which are compatible with all Xojo 2025r2+ versions. </p>



<p>With the introduction of the new MobileMapViewer for Android, users now have the ability to customize the behavior and appearance of MobileMapViewer instances. For example, they can hide the zoom controls by using <code>SetZoomControlsEnabledXC(False)</code>, or enable/disable certain gestures (zoom, rotation, etc.). You can also set the minimum and maximum zoom level for the control by using the <code>SetMaxZoomPreferenceXC</code> or <code>SetMinZoomPreferenceXC</code> methods. </p>



<p>Android 15 users now also gain access to 16 additional system colors.</p>



<p>Give it a try! More exciting Android features are coming soon. Stay tuned! </p>



<p>Feel free to take a look at the developer repository, create feature requests, and provide feedback on extending this extension library. </p>



<p>I’m happy to receive any voluntary financial support for the work I’ve done so far, which you are welcome to <a href="https://www.paypal.com/paypalme/MTrippensee">share here</a>. You can download the project with many examples at <a href="https://github.com/XojoGermany/AndroidDesignExtensions">https://github.com/XojoGermany/AndroidDesignExtensions</a>.</p>



<p>Happy coding.</p>



<p><em>Martin T. is a Xojo MVP and has been very involved in testing Android support.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Identify Yourself with UserAuthentication for Android</title>
		<link>https://blog.xojo.com/2025/07/08/identify-yourself-with-userauthentication-for-android/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 08 Jul 2025 18:01:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[2025r2]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Authentication]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14879</guid>

					<description><![CDATA[Mobile devices typically have a way for the user to identify themself. This can be using a fingerprint sensor, face detection or even with an&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Mobile devices typically have a way for the user to identify themself. This can be using a fingerprint sensor, face detection or even with an old-school passcode or password. The <a href="https://documentation.xojo.com/api/ios/userauthentication.html#userauthentication">UserAuthentication class</a>, now also available for Android, is a great way to do this authentication.</p>



<p>UserAuthentication works similarly to how it is used on iOS. You can drag the control from the Library onto your layout and then implement the AuthenticationSucceeded event.</p>



<p>To request authentication, call the Request() method with a short string asking the reason why you need authentication.</p>



<pre class="wp-block-code"><code>UserAuthentication1.Request("Authorize me, HAL")</code></pre>



<p>Because this is using system-level APIs, you and your app never know the details about the authentication. You will not know the password, passcode or have any specifics about a fingerprint or face. Instead, if the system determines that the authentication was successful, then the AuthenticationSucceeded event is called.</p>



<p>Here&#8217;s a quick video of it in action.</p>



<figure class="wp-block-video"><video height="640" style="aspect-ratio: 360 / 640;" width="360" controls src="https://blog.xojo.com/wp-content/uploads/2025/06/HALVideoSmall.mov"></video></figure>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		<enclosure url="https://blog.xojo.com/wp-content/uploads/2025/06/HALVideoSmall.mov" length="8694754" type="video/quicktime" />

			</item>
		<item>
		<title>Share More with the Improved MobileSharingPanel</title>
		<link>https://blog.xojo.com/2025/07/08/share-more-with-the-improved-mobilesharingpanel/</link>
		
		<dc:creator><![CDATA[Javier Menendez]]></dc:creator>
		<pubDate>Tue, 08 Jul 2025 18:01:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[2025r2]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14943</guid>

					<description><![CDATA[Starting with Xojo 2025r2, you can share more than ever before using the MobileSharingPanel. Keep reading to discover the exciting improvements waiting for you! In&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Starting with Xojo 2025r2, you can share more than ever before using the MobileSharingPanel. Keep reading to discover the exciting improvements waiting for you!</p>



<span id="more-14943"></span>



<p>In previous releases, the MobileSharingPanel control allowed your app to share a single picture, a URL, or text with any registered iOS system service or app. Now, you can share multiple pictures at once and also share as many files as you want (including entire folders)!</p>



<p>To share multiple pictures, we’ve overloaded the <code>SharingPanel.SharePicture</code> method so its first parameter can accept an array of pictures. It’s that simple. When the panel appears, the same action will apply to the whole group.</p>



<p>For sharing files, you now have two methods available:</p>



<pre class="wp-block-preformatted">MobileSharingPanel.ShareFile(file As FolderItem, parentScreen As MobileScreen = Nil, parentControl As MobileUIControl = Nil)<br><br>MobileSharingPanel.ShareFile(files() As FolderItem, parentScreen As MobileScreen = Nil, parentControl As MobileUIControl = Nil)</pre>



<p>The first method is designed to share a single <code>FolderItem</code> instance. If that <code>FolderItem</code> points to a folder, the entire contents of the folder will be shared.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1179" height="2556" src="https://blog.xojo.com/wp-content/uploads/2025/05/SharingFiles.png" alt="" class="wp-image-14944" srcset="https://blog.xojo.com/wp-content/uploads/2025/05/SharingFiles.png 1179w, https://blog.xojo.com/wp-content/uploads/2025/05/SharingFiles-138x300.png 138w, https://blog.xojo.com/wp-content/uploads/2025/05/SharingFiles-472x1024.png 472w, https://blog.xojo.com/wp-content/uploads/2025/05/SharingFiles-768x1665.png 768w, https://blog.xojo.com/wp-content/uploads/2025/05/SharingFiles-709x1536.png 709w, https://blog.xojo.com/wp-content/uploads/2025/05/SharingFiles-945x2048.png 945w" sizes="auto, (max-width: 1179px) 100vw, 1179px" /></figure>



<p>The second method accepts an array of <code>FolderItem</code> instances as its first parameter. This is likely the best choice when your app needs to share a group of items from different sources, offering greater flexibility.</p>



<p>Overall, the enhanced SharingPanel is now more powerful and versatile. We’re excited to see how you’ll put it to use in your mobile apps!</p>



<p><em>Javier Menendez is an engineer at Xojo and has been using Xojo since 1998. He lives in Castellón</em>, <em>Spain and hosts regular Xojo hangouts en español. Ask Javier questions on Twitter at <a href="https://twitter.com/xojoes" target="_blank" rel="noreferrer noopener">@XojoES</a> or on the <a href="https://forum.xojo.com/u/javier_menendez/summary" target="_blank" rel="noreferrer noopener">Xojo Forum</a>.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Get There From Here with the MobileMapViewer for Android</title>
		<link>https://blog.xojo.com/2025/07/08/get-there-from-here-with-the-mobilemapviewer-for-android/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 08 Jul 2025 18:01:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[2025r2]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Maps]]></category>
		<category><![CDATA[MobileMapViewer]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14873</guid>

					<description><![CDATA[A new control added to Android for Xojo 2025r2 is MobileMapViewer. This control uses the Google Maps SDK to display mapping data in your apps.&#8230;]]></description>
										<content:encoded><![CDATA[
<p>A new control added to Android for Xojo 2025r2 is MobileMapViewer. This control uses the Google Maps SDK to display mapping data in your apps.</p>



<p>Before you can use MobileMapViewer you will need to have a Google Maps account configured so that you can generate an API Key. Instructions for doing this on available from Google: <a href="https://mapsplatform.google.com">Google Maps Platform</a>, <a href="https://developers.google.com/maps/documentation/embed/get-api-key">Get Google Maps API Key</a>.</p>



<p>Google Maps is not free to use. Although there is some free usage available for testing your app, your account does get billed based on usage once the small amount of free testing credits are used up.</p>



<p>When you have your API Key, you can add it to your Xojo project using a new App property. Select App in the Navigator and in the Inspector, put the key in the Google Maps API Key field. Note that the key is not saved with text projects and is instead saved as part of the UI state file that is local to the development machine. This prevents the key from being accidently committed to a source code repository.</p>



<p>With the configuration work out of the way, you can now use the control. Drag a <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilemapviewer.html#mobilemapviewer">MobileMapViewer</a> from the Library onto a screen. When you run the project you&#8217;ll see an interactive map that you can swipe, zoom and move around as you like.</p>



<p>This code shows Fenway Park in Boston:</p>



<pre class="wp-block-code"><code>FenwayLocation = New MapLocation("Fenway Park, Boston, MA USA")
FenwayLocation.Title = "Fenway Park"

MapViewer1.ZoomRadius = 5
MapViewer1.GoToLocation(FenwayLocation) // Center map within radius km

MapViewer1.AddLocation(FenwayLocation) // Drop a pin</code></pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="482" height="1024" src="https://blog.xojo.com/wp-content/uploads/2025/06/CleanShot-2025-06-17-at-14.43.39@2x-482x1024.png" alt="" class="wp-image-14991" srcset="https://blog.xojo.com/wp-content/uploads/2025/06/CleanShot-2025-06-17-at-14.43.39@2x-482x1024.png 482w, https://blog.xojo.com/wp-content/uploads/2025/06/CleanShot-2025-06-17-at-14.43.39@2x-141x300.png 141w, https://blog.xojo.com/wp-content/uploads/2025/06/CleanShot-2025-06-17-at-14.43.39@2x-768x1632.png 768w, https://blog.xojo.com/wp-content/uploads/2025/06/CleanShot-2025-06-17-at-14.43.39@2x-723x1536.png 723w, https://blog.xojo.com/wp-content/uploads/2025/06/CleanShot-2025-06-17-at-14.43.39@2x.png 916w" sizes="auto, (max-width: 482px) 100vw, 482px" /></figure>



<p>The <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilemapviewer.html#mobilemapviewer">MobileMapVIewer API</a> matches what has already been in use for iOS. You can also use the <a href="https://documentation.xojo.com/api/ios/maplocation.html">MapLocation class</a> to track specific locations. Although the overall API matches what has been used for iOS, there is one exception: MapLocation.PointsOfInterest() is not yet implemented. Implementing this requires another Google SDK and API Key (the <a href="https://developers.google.com/maps/documentation/places/web-service/overview">Places API</a>) and is being reviewed for a future release. We may also consider adding alternative mapping engines as well.</p>



<p>Note: <a href="https://youtu.be/p6V2Ew1M0sE?si=wLQo3S8HKaiULKid&amp;t=72">You can&#8217;t get there from here</a> is an old Maine saying.</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Year of Code 2025: May Project, Mobile Apps</title>
		<link>https://blog.xojo.com/2025/05/07/year-of-code-2025-may-project-mobile-apps/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Wed, 07 May 2025 16:00:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Year of Code]]></category>
		<category><![CDATA[#YearofCode]]></category>
		<category><![CDATA[Beginner Tips]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[Software Development]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14805</guid>

					<description><![CDATA[One of the most common things I love to use my phone for is sharing pictures of my pets with others. We have two cats&#8230;]]></description>
										<content:encoded><![CDATA[
<p>One of the most common things I love to use my phone for is sharing pictures of my pets with others. We have two cats and a dog: Shawmut, Christofur and Lucy. To be honest, I’m not much a cat person as I find that cats are almost all <a href="https://24hrtees.net/shop/dont-be-a-richard/">Richards</a>, constantly causing and getting into trouble. I’m 100% a dog person.</p>



<p>But even though I have my own pets, I do love looking at pet pictures. It&#8217;s a simple pleasure, but there&#8217;s not much that I find more calming.</p>



<p>Years ago I made a Xojo app (CatsUp) that displayed random cat pictures and it was a lot of fun. And one thing that Xojo excels at is making it fun to create software! That’s what the Year of Code is all about, after all.</p>



<p>Speaking of that, here is the Year of Code topic for May: <strong>Mobile Apps</strong>.</p>



<p>You can already find CatsUp for iOS and Android included in the Xojo examples, but why stop at just cats? Being a dog guy, I want to see some dogs. All the dogs.</p>



<p>Since I’m not here to start a cats vs. dogs war, I thought, why not both? It turns out I’m not the only one that thinks this as there are actually public web services that serve up pictures of cats and dogs. Web services and mobile apps go together like peanuts butter and chocolate.</p>



<p>The web service for cats that I’ve previously used is called TheCatAPI and is available here: <a href="https://thecatapi.com">https://thecatapi.com</a></p>



<p>There is an equivalent dog one called, unsurprisingly, TheDogAPI: <a href="https://www.thedogapi.com">https://www.thedogapi.com</a></p>



<p>For my mobile app this month, I’ve created an all-new app that can show pictures of cats, dogs or both! I call it Pawz.</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="1024" height="1024" src="https://blog.xojo.com/wp-content/uploads/2025/04/Pawz.png" alt="" class="wp-image-14806" style="width:344px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2025/04/Pawz.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/04/Pawz-300x300.png 300w, https://blog.xojo.com/wp-content/uploads/2025/04/Pawz-150x150.png 150w, https://blog.xojo.com/wp-content/uploads/2025/04/Pawz-768x768.png 768w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Pawz app icon</figcaption></figure>



<p>Actually, it&#8217;s two apps since I made versions for iOS and Android. Here’s a look:</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="497" height="1024" src="https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.44.54@2x-497x1024.png" alt="" class="wp-image-14810" style="width:309px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.44.54@2x-497x1024.png 497w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.44.54@2x-145x300.png 145w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.44.54@2x-768x1584.png 768w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.44.54@2x-745x1536.png 745w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.44.54@2x.png 867w" sizes="auto, (max-width: 497px) 100vw, 497px" /><figcaption class="wp-element-caption">Pawz on iOS</figcaption></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="480" height="1024" src="https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.41.34@2x-480x1024.png" alt="" class="wp-image-14809" style="width:298px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.41.34@2x-480x1024.png 480w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.41.34@2x-141x300.png 141w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.41.34@2x-768x1637.png 768w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.41.34@2x-721x1536.png 721w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.41.34@2x.png 915w" sizes="auto, (max-width: 480px) 100vw, 480px" /><figcaption class="wp-element-caption">Pawz on Android</figcaption></figure>
</div>
</div>



<p>Although they are separate projects, both use basically the same code. In fact there is only about 50 lines of code in each project! The UI itself is just a big ImageViewer that is used to show the picture and several toolbar buttons.</p>



<p>There are three buttons to request a cat picture, dog picture or a surprise picture that could be either. There is also an extra button that lets you share the picture, if you really like it.</p>



<p>You can find the source for the iOS and Android versions of Pawz on GitHub here:</p>



<p><a href="https://github.com/paullefebvre/pawz">https://github.com/paullefebvre/pawz</a></p>



<p>Year of Code is all about having some fun making an app. As you can see with Pawz, it doesn&#8217;t have to be anything extravagant. Even fun apps can be made quickly with very little code!</p>



<p>I can&#8217;t wait to see what great mobile apps you all create this month. <a href="https://forum.xojo.com/t/2025-year-of-code-may-is-mobile/85272">Share your creations in the Forum topic</a>.</p>



<h2 class="wp-block-heading"><strong>One More Thing</strong></h2>



<p>Although phones and tablets are what we usually think of when talking about Mobile Apps, you know what else is rather mobile? A vehicle! And it just so happens that many vehicle manufacturers, such as  Cadillac, Chevy, Ford, Honda, Polestar, Renault and Volvo are now using Android to run their infotainment systems. Technically it&#8217;s Android Automotive OS (AAOS), but it is very similar to regular Android.</p>



<p>Because Xojo builds standard Android Runtime (ART) apps, Xojo Android apps also work on Android Automotive OS as a &#8220;parked app&#8221;. You can test with this by using Android Studio to install an Android Automotive VM for the Emulator. Once you’ve added that you can run your Xojo Android projects on it just like any other device. Pawz works fine in an AAOS Emulator.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="1008" src="https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.55.26@2x-1024x1008.png" alt="" class="wp-image-14813" srcset="https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.55.26@2x-1024x1008.png 1024w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.55.26@2x-300x295.png 300w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.55.26@2x-768x756.png 768w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.55.26@2x-1536x1512.png 1536w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-16-at-13.55.26@2x-2048x2016.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Why do I bring this up? No reason, although I believe Xojo 2025 Release 2 pre-release testing might be starting soon&#8230;</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>



<p><strong>Year of Code Project</strong></p>



<ul class="wp-block-list">
<li><a href="https://blog.xojo.com/2025/01/09/year-of-code-2025-kickoff/">Year of Code: Kickoff</a></li>



<li><a href="https://blog.xojo.com/2025/01/15/year-of-code-2025-january-project/" target="_blank" rel="noreferrer noopener">January Project: Desktop Apps</a>&nbsp;|&nbsp;<a href="https://forum.xojo.com/t/year-of-code-2025-january-project-sharing/83927" target="_blank" rel="noreferrer noopener">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/02/11/year-of-code-2025-february-project/">February Project: Database Apps</a>&nbsp;|&nbsp;<a href="https://forum.xojo.com/t/2025-year-of-code-february" target="_blank" rel="noreferrer noopener">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/03/05/year-of-code-2025-march-project-web-apps/">March Project: Web Apps</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-march/84474?u=alyssa_foley">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/04/08/year-of-code-2025-april-project-user-interface/">April Project: User Interface</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-april-user-interface/84926">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/05/07/year-of-code-2025-may-project-mobile-apps/">May Project: Mobile Apps</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-may-is-mobile/85272">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/06/10/year-of-code-2025-june-project-cross-platform-code-class/">June Project: Code Sharing</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-june-is-code-sharing/85612">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/07/10/year-of-code-2025-july-project-charting/">July Project: Charting</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-july-is-charting/85896">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/08/07/year-of-code-2025-august-project-console-apps/">August Project: Console Apps</a> | <a href="https://forum.xojo.com/t/august-2025-year-of-code-console-apps/86203">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/09/08/year-of-code-2025-september-project-games/">September Project: Games</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-septgamer">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/10/13/year-of-code-2025-october-project-multi-platform-communication/">October Project: Multi-Platform</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-october-multi-platform-communication/86717">Forum Discussion</a></li>



<li><a href="https://blog.xojo.com/2025/11/10/year-of-code-2025-november-project-pdf-postcard-generator/">November Project: PDF</a> | <a href="https://forum.xojo.com/t/2025-year-of-code-november-pdf/86969">Forum Discussion</a></li>
</ul>



<p><strong>How to Play:</strong></p>



<p>Each month we&#8217;ll announce a new theme and share an example project of our own. Share your projects to the Xojo Forum thread for that month via GitHub (all the links you need are posted above ↑ ). Learn how to use <a href="https://blog.xojo.com/2024/04/02/using-xojo-and-github/">Xojo and GitHub</a>.</p>



<p><strong>The Prizes:</strong></p>



<p>Monthly winners get $100 at the Xojo store. Every month you submit a project is another chance to win the grand prize. The grand prize is $250 cash plus a Xojo Pro license and a year of GraffitiSuite and will be announce in December. Learn more about the <a href="https://blog.xojo.com/2025/01/09/year-of-code-2025-kickoff/#prizes">prizes</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Writing Drawing Code for Android, Desktop, iOS and Web</title>
		<link>https://blog.xojo.com/2025/04/21/writing-drawing-code-for-android-desktop-ios-and-web/</link>
		
		<dc:creator><![CDATA[Geoff Perlman]]></dc:creator>
		<pubDate>Mon, 21 Apr 2025 19:28:10 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[Multi-Platform Development]]></category>
		<category><![CDATA[Variants]]></category>
		<category><![CDATA[WebGraphics]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14826</guid>

					<description><![CDATA[When writing code it&#8217;s always a good idea to be thinking about the future. Today you are creating a desktop project but tomorrow you might&#8230;]]></description>
										<content:encoded><![CDATA[
<p>When writing code it&#8217;s always a good idea to be thinking about the future. Today you are creating a desktop project but tomorrow you might need to create an Android or iOS project. That code you&#8217;re writing might be code you could use for another project for another platform. </p>



<p>For the most part, writing drawing code will <em>just work</em> because you use Xojo&#8217;s <a href="https://documentation.xojo.com/api/graphics/graphics.html#graphics" target="_blank" rel="noreferrer noopener">Graphics</a> class for Android, Desktop and iOS projects. Web projects, however, don&#8217;t use the Graphics class. The <a href="https://documentation.xojo.com/api/user_interface/web/webcanvas.html#description" target="_blank" rel="noreferrer noopener">WebCanvas</a> control&#8217;s <a href="https://documentation.xojo.com/api/user_interface/web/webcanvas.html#webcanvas-paint" target="_blank" rel="noreferrer noopener">Paint</a> event is passed a <a href="https://documentation.xojo.com/api/graphics/webgraphics.html" target="_blank" rel="noreferrer noopener">WebGraphics</a> object. While the Graphics and WebGraphics classes have a lot in common, sharing many of the same methods with the same parameters, they are two distinctly different classes from the perspective of the Xojo compiler. That means that while the code you write will look almost identical, you still have to use a Graphics object for Android, Desktop and iOS projects and a WebGraphics object for Web projects. </p>



<p>Your instinct might be to simply write the code for one and then copy it to the other projects, changing Graphics to WebGraphics for Web projects. This will of course work, but then you have to remember to do this copy/paste/change operation every time you update your code. That&#8217;s not ideal.</p>



<h2 class="wp-block-heading">Graphics vs. WebGraphics</h2>



<p>With Xojo, the code can be written in such a way as to automatically handle the difference between Graphics/WebGraphics. Most often your graphics methods will be called from something that provides a Graphics or WebGraphics object for you to draw into such as a Canvas control&#8217;s Paint event. From there your code will call your methods that do the drawing. The problem is that your methods can&#8217;t use a Graphics or a WebGraphics type as a parameter because Graphics is not going to work for your Web projects and WebGraphics doesn&#8217;t exist in any framework except the Web framework. Thus using it anywhere else will result in a compiler error.</p>



<h3 class="wp-block-heading">Using a Variant</h3>



<p>Getting around this limitation is, fortunately, quite easy. Instead of using Graphics or WebGraphics as a parameter type, you use <a href="https://documentation.xojo.com/api/data_types/variant.html" target="_blank" rel="noreferrer noopener">Variant</a>. A Variant can hold any type of data from Strings to Integers, to Graphics to WebGraphics and more.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="560" height="466" src="https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-17-at-14.46.40@2x.png" alt="" class="wp-image-14827" srcset="https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-17-at-14.46.40@2x.png 560w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-17-at-14.46.40@2x-300x250.png 300w" sizes="auto, (max-width: 560px) 100vw, 560px" /></figure>



<p>Once your drawing method gets the Variant though, it can&#8217;t use it to draw. It can only use a Graphics or WebGraphics objects. The trick is to then copy it into a Graphics or WebGraphics class variable:</p>



<pre class="wp-block-code"><code><code>Var g As Graphics = context</code></code></pre>



<p>or</p>



<pre class="wp-block-code"><code><code>Var g As WebGraphics = context</code></code></pre>



<p>The problem you now face, as mentioned earlier, is that WebGraphics only exists in Web projects. That means you have to write your code in such a way that you will declare the variable g as a Graphics object in Android, Desktop and iOS projects and as a WebGraphics object in Web projects. This can be achieved via conditional compilation. This is a simple technique that tells the Xojo compiler to only compile code into your app if conditions you specify are met. In this case, if you&#8217;re targeting Desktop or Mobile, it should compile in the line that uses the Graphics type, and if you are targeting a Web app, the line that uses WebGraphics. To conditionally compile, you just need to add that conditional code around these two lines:</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<pre class="wp-block-code"><code>#If TargetDesktop Or TargetMobile Then
   Var g As Graphics = context
#EndIf

#If TargetWeb Then
   Var g As WebGraphics = context
#EndIf</code></pre>
</div></div>
</div></div>



<p>Since a project must be only one of the above types, when you run or build your project, the appropriate line of code will be compiled in. From there, you now have a variable (g) of the right type can use this to draw whatever you like. For example, there are four identical example projects (one for each project type) that show off this technique. They can be found in the Xojo IDE by choosing File > New Project, clicking on Examples, choosing the Graphics folder in the list and then the Cross-Platform Drawing folder. The examples all draw a checkerboard that looks like this:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" width="912" height="916" src="https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-17-at-15.12.41@2x.png" alt="" class="wp-image-14828" style="width:315px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-17-at-15.12.41@2x.png 912w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-17-at-15.12.41@2x-300x300.png 300w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-17-at-15.12.41@2x-150x150.png 150w, https://blog.xojo.com/wp-content/uploads/2025/04/CleanShot-2025-04-17-at-15.12.41@2x-768x771.png 768w" sizes="auto, (max-width: 912px) 100vw, 912px" /></figure>
</div>


<p>They all contain the an identical Checkerboard class that handles the drawing. This class has DrawBorder and DrawCheckers methods that both take a Variant as a parameter. In each project is a Canvas control whose Paint event calls these methods:</p>



<pre class="wp-block-code"><code>Var cb As New Checkerboard
cb.DrawBoard(g)
cb.DrawCheckers(g)</code></pre>



<p>The full DrawBoard method looks like this:</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<pre class="wp-block-code"><code>#If TargetDesktop Or TargetMobile Then
  Var g As Graphics = context
#EndIf

#If TargetWeb Then
  Var g As WebGraphics = context
#EndIf 

Var boxSize As Integer = Min(g.Width/8, g.Height/8) 'The size of the box
'Draw the rows
For y As Integer = 0 To 7
  For x As Integer = 0 To 7
    'Switch colors for each box in the row
    If g.DrawingColor = Color.Black Then
      g.DrawingColor = Color.White
    Else
      g.DrawingColor = Color.Black
    End If
    'Draw a box
    g.FillRectangle(x * boxSize, y * boxSize, boxSize, boxSize)
  Next
  'Switch colors again for the beginning of the next row
  If g.DrawingColor = Color.Black Then
    g.DrawingColor = Color.White
  Else
    g.DrawingColor = Color.Black
  End If
Next</code></pre>
</div></div>



<p>In the example projects, check out the DrawCheckers method as well. It uses the same technique. What is great about this is that this class can be copied into any Android, Desktop, iOS or Web project and it will indeed <em>just work</em>.</p>



<h3 class="wp-block-heading">Checking Out the Examples</h3>



<p>There are four example projects (one for each project type &#8211; Android, Desktop, iOS and Web) that demonstrate the technique explained here. You can find them in the Xojo IDE by choosing File > New Project, clicking on Examples, choosing the Graphics folder in the list and then the Cross-Platform Drawing folder.</p>



<p><em>Geoff Perlman is the Founder and CEO of Xojo. When he’s not leading the Xojo team he can be found playing drums in Austin, Texas and spending time with his family.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Android ColorGroup and Improved Dark Mode Support</title>
		<link>https://blog.xojo.com/2025/03/25/android-colorgroup-and-improved-dark-mode-support/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 25 Mar 2025 15:33:35 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[2025r1]]></category>
		<category><![CDATA[ColorGroups]]></category>
		<category><![CDATA[DarkMode]]></category>
		<category><![CDATA[Layout Editor]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14622</guid>

					<description><![CDATA[Xojo 2025 Release 1 adds support for ColorGroups and improves dark mode support for Android. ColorGroups Now available for Android, ColorGroups are a way to&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Xojo 2025 Release 1 adds support for ColorGroups and improves dark mode support for Android.</p>



<h2 class="wp-block-heading">ColorGroups</h2>



<p>Now available for Android, ColorGroups are a way to have a color that can differ between light mode and dark mode. There are three types of ColorGroups: Single, Dual and Named. Add a ColorGroup to your project using Insert-&gt;ColorGroup.</p>



<p>A Single ColorGroup is not really a group, it is just a single color. A Dual ColorGroup has separate colors for light and dark mode. A Named ColorGroup gets the color from the system or, in the case of Android, the app theme. You can see the available options in the Android submenu.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="977" height="1024" src="https://blog.xojo.com/wp-content/uploads/2025/03/CleanShot-2025-03-05-at-14.30.12@2x-977x1024.png" alt="" class="wp-image-14623" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/CleanShot-2025-03-05-at-14.30.12@2x-977x1024.png 977w, https://blog.xojo.com/wp-content/uploads/2025/03/CleanShot-2025-03-05-at-14.30.12@2x-286x300.png 286w, https://blog.xojo.com/wp-content/uploads/2025/03/CleanShot-2025-03-05-at-14.30.12@2x-768x805.png 768w, https://blog.xojo.com/wp-content/uploads/2025/03/CleanShot-2025-03-05-at-14.30.12@2x-1465x1536.png 1465w, https://blog.xojo.com/wp-content/uploads/2025/03/CleanShot-2025-03-05-at-14.30.12@2x-1953x2048.png 1953w, https://blog.xojo.com/wp-content/uploads/2025/03/CleanShot-2025-03-05-at-14.30.12@2x.png 2020w" sizes="auto, (max-width: 977px) 100vw, 977px" /></figure>



<p>For the most part you can use ColorGroups just like you can with other project types. Android does have one addition, the ColorGroup.ToColor() method lets you specifically convert a ColorGroup to a Color. Normally this is done automatically by Operator_Convert, but support for that in Android is still young and this method serves as a workaround should you run into issues with it.</p>



<p>In the Inspector for controls with ColorGroup properties, such as MobileButton.CaptionColor, you can use the ColorGroup selector to manually choose a Color or a ColorGroup:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="590" height="444" src="https://blog.xojo.com/wp-content/uploads/2025/03/CleanShot-2025-03-05-at-14.32.38@2x.png" alt="" class="wp-image-14624" srcset="https://blog.xojo.com/wp-content/uploads/2025/03/CleanShot-2025-03-05-at-14.32.38@2x.png 590w, https://blog.xojo.com/wp-content/uploads/2025/03/CleanShot-2025-03-05-at-14.32.38@2x-300x226.png 300w" sizes="auto, (max-width: 590px) 100vw, 590px" /></figure>



<p>In addition to working with ColorGroups as project items, you can also create ColorGroups in code:</p>



<pre class="wp-block-code"><code>Var cg1 As New ColorGroup()
cg1.AddColorPair(ColorGroup.Platforms.Mobile, Color.Blue, Color.Teal)</code></pre>



<p>You can also use Android system color names to create a named color:</p>



<pre class="wp-block-code"><code>Var cg2 As New ColorGroup()
cg1.AddNamedColor(ColorGroup.Platforms.Mobile, "holo_purple")</code></pre>



<p>Refer to the <a href="https://developer.android.com/reference/android/R.color.html">Android docs for R.color</a> to see what the system color names are. Keep in mind that not all names are available on all versions Android OS.</p>



<p>For more about ColorGroups, <a href="https://documentation.xojo.com/api/graphics/colorgroup.html#colorgroup">refer to the documentation</a>.</p>



<h2 class="wp-block-heading">Dark Mode Support</h2>



<p>ColorGroups are particularly useful with dark mode and starting with 2025r1, Android projects now default to having Supports Dark Mode switched on.</p>



<p>Several controls have been improved to work better in dark mode at runtime.</p>



<p>In addition, the Android Layout Editor has been improved to look better when working in dark mode and now shows controls with dark mode variants.</p>



<p><a href="https://xojo.com/download/" target="_blank" rel="noreferrer noopener">Download</a> the latest Xojo release and get access to these new features and more. </p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Use AndroidMobileUserControl to Create Custom Controls</title>
		<link>https://blog.xojo.com/2025/03/25/use-androidmobileusercontrol-to-create-custom-controls/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 25 Mar 2025 15:30:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[2025r1]]></category>
		<category><![CDATA[Control]]></category>
		<category><![CDATA[Declares]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[User Interface]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14637</guid>

					<description><![CDATA[Xojo for Android has robust Declare and Library support that allows you to call into many native Android libraries and frameworks. With the newly added&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Xojo for Android has robust <a href="https://blog.xojo.com/2024/10/01/android-declare-and-library-enhancements/">Declare and Library support</a> that allows you to call into many native Android libraries and frameworks. With the newly added AndroidMobileUserControl you can also create your own native UI controls as well.</p>



<p>This control is available in the Xojo Library panel and works similarly to iOSMobileUserControl: drag it onto a layout and implement the CreateView event.</p>



<pre class="wp-block-code"><code>Declare Function Button Lib "Kotlin" Alias "android.widget.Button(context as android.content.Context)" (context As Ptr) As Ptr

Var bp As Ptr = Button(App.AndroidContextHandle)

Return bp</code></pre>



<p>The above code uses a Declare to create a native Button and returns it so that it can be displayed in a layout.</p>



<p>By using AndroidMobileUserControl and Declares to access the Android UI library, you can create your own UI controls. I look forward to seeing what the community creates!</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Android Design Extensions 3.5 for Xojo 2024r4+</title>
		<link>https://blog.xojo.com/2024/12/10/android-design-extensions-3-5-for-xojo-2024r4/</link>
		
		<dc:creator><![CDATA[Martin T.]]></dc:creator>
		<pubDate>Tue, 10 Dec 2024 16:38:03 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Android Design Extensions]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Declares]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14175</guid>

					<description><![CDATA[With the release of Xojo 2024r4, it’s time to unveil a new version of the Android Design Extensions. The focus of version 3.5 (compatible with&#8230;]]></description>
										<content:encoded><![CDATA[
<p>With the release of Xojo 2024r4, it’s time to unveil a new version of the Android Design Extensions. The focus of version 3.5 (compatible with all Xojo versions starting from 2024r4+) was on code maintenance and introducing exceptions for unsupported API calls, depending on the running Android version. This should make your work as a developer easier.</p>



<p>You can now use the <em>SetBottomAppBarMenuAlignmentModeXC </em>extension method for MobileScreen to set the alignment of the buttons in your MobileScreen.Toolbar.</p>



<p>Additionally, new declares for MobileMessageBox have been added, allowing you to display an icon next to the title as well as next to individual buttons.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="498" height="1024" src="https://blog.xojo.com/wp-content/uploads/2024/12/3C6F953F-1315-4016-8A7B-F2427E7F54BC-498x1024.png" alt="" class="wp-image-14176" srcset="https://blog.xojo.com/wp-content/uploads/2024/12/3C6F953F-1315-4016-8A7B-F2427E7F54BC-498x1024.png 498w, https://blog.xojo.com/wp-content/uploads/2024/12/3C6F953F-1315-4016-8A7B-F2427E7F54BC-146x300.png 146w, https://blog.xojo.com/wp-content/uploads/2024/12/3C6F953F-1315-4016-8A7B-F2427E7F54BC-768x1579.png 768w, https://blog.xojo.com/wp-content/uploads/2024/12/3C6F953F-1315-4016-8A7B-F2427E7F54BC-747x1536.png 747w, https://blog.xojo.com/wp-content/uploads/2024/12/3C6F953F-1315-4016-8A7B-F2427E7F54BC-996x2048.png 996w, https://blog.xojo.com/wp-content/uploads/2024/12/3C6F953F-1315-4016-8A7B-F2427E7F54BC.png 1080w" sizes="auto, (max-width: 498px) 100vw, 498px" /></figure>



<p>Give it a try! More exciting Android features are coming soon. Stay tuned!</p>



<p>Feel free to take a look at the developer repository, create feature requests, and provide feedback on extending this extension library.</p>



<p>I’m happy to receive any voluntary financial support for the work I’ve done so far, which you are welcome to <a href="https://www.paypal.com/paypalme/MTrippensee">share here</a>. You can download the project with many examples at <a href="https://github.com/XojoGermany/AndroidDesignExtensions">https://github.com/XojoGermany/AndroidDesignExtensions</a>.</p>



<p>Happy coding.</p>



<p><em>Martin T. is a Xojo MVP and has been very involved in testing Android support.</em></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Android Localization</title>
		<link>https://blog.xojo.com/2024/12/10/android-localization/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 10 Dec 2024 16:37:49 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[2024r4]]></category>
		<category><![CDATA[App Localization]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13927</guid>

					<description><![CDATA[You can now take advantage of Localized Strings in your Android projects to better localize your text. Localized Strings are added to using the Constant&#8230;]]></description>
										<content:encoded><![CDATA[
<p>You can now take advantage of Localized Strings in your Android projects to better localize your text. Localized Strings are added to using the Constant Editor using these steps:</p>



<ol class="wp-block-list">
<li>Add a Constant, give it a name, default value and set its type to String.</li>



<li>A Localized property will now appear in the Inspector. Turn it on.</li>



<li>This constant will now appear in a new &#8220;Localized Strings&#8221; section in the Navigator for the project item.</li>



<li>Use the &#8220;+&#8221; button to add a localized string, then set its Language and Value.</li>



<li>Use this localized string in your project.</li>
</ol>



<p>Below is a localized string that contains some translations of &#8220;thanks&#8221;.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="213" src="https://blog.xojo.com/wp-content/uploads/2024/10/image-1-1024x213.png" alt="" class="wp-image-13928" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/image-1-1024x213.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/10/image-1-300x62.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/image-1-768x160.png 768w, https://blog.xojo.com/wp-content/uploads/2024/10/image-1-1536x319.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/10/image-1-2048x426.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The most common way to use this is to specify the localized string name as the text property for a control, such as a Label. You prefix the name with &#8220;#&#8221; to indicate it should be looked up at runtime.</p>



<p>Below you can see &#8220;#ThanksString&#8221; is set as the value for the Text property of Label1.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="776" src="https://blog.xojo.com/wp-content/uploads/2024/10/image-2-1024x776.png" alt="" class="wp-image-13929" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/image-2-1024x776.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/10/image-2-300x227.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/image-2-768x582.png 768w, https://blog.xojo.com/wp-content/uploads/2024/10/image-2-1536x1164.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/10/image-2.png 1866w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Note that &#8220;Default&#8221; is shown in the IDE because it is using the value for the &#8220;Default&#8221; language in the localized string. If there was no &#8220;Default&#8221; language, then the value specified in the Inspector as the &#8220;Default Value&#8221; is shown in the IDE.</p>



<p>If we then run this project on a device set to US locale, it displays &#8220;Thanks&#8221;:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="800" height="554" src="https://blog.xojo.com/wp-content/uploads/2024/10/image-3.png" alt="" class="wp-image-13931" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/image-3.png 800w, https://blog.xojo.com/wp-content/uploads/2024/10/image-3-300x208.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/image-3-768x532.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></figure>



<p>If I change to a German locale and run again, it shows &#8220;Danke&#8221;:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="774" height="466" src="https://blog.xojo.com/wp-content/uploads/2024/10/image-6.png" alt="" class="wp-image-13934" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/image-6.png 774w, https://blog.xojo.com/wp-content/uploads/2024/10/image-6-300x181.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/image-6-768x462.png 768w" sizes="auto, (max-width: 774px) 100vw, 774px" /></figure>



<p>To change the locale, open <em>Settings</em> on the Android device. Navigate to <em>System</em> and then <em>Languages &amp; input</em>. There you will see the <em>Languages</em> option.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="780" height="514" src="https://blog.xojo.com/wp-content/uploads/2024/10/image-4.png" alt="" class="wp-image-13932" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/image-4.png 780w, https://blog.xojo.com/wp-content/uploads/2024/10/image-4-300x198.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/image-4-768x506.png 768w" sizes="auto, (max-width: 780px) 100vw, 780px" /></figure>



<p>Choose that to see the list of languages supported by the device. Click the &#8220;+&#8221; to add a language. Here I&#8217;ve added German (Deutsch):</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="758" height="758" src="https://blog.xojo.com/wp-content/uploads/2024/10/image-5.png" alt="" class="wp-image-13933" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/image-5.png 758w, https://blog.xojo.com/wp-content/uploads/2024/10/image-5-300x300.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/image-5-150x150.png 150w" sizes="auto, (max-width: 758px) 100vw, 758px" /></figure>



<p>To make Deutsch the default, drag it so that it is first in the list. You&#8217;ll immediately see the UI change its language.</p>



<p>You can also specifically request a language in code by providing the locale as a parameter to the localized string. For example to get the French value:</p>



<pre class="wp-block-code"><code>Var french As String
french = ThanksString("FR")
// Variable french now contains "Merci".</code></pre>



<p>Read the <a href="https://documentation.xojo.com/topics/localizing_your_apps/introduction_to_app_localization.html">Introduction to App Localization</a> documentation topic to learn more.</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Android Language Features</title>
		<link>https://blog.xojo.com/2024/12/10/android-language-features/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 10 Dec 2024 16:37:38 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[2024r4]]></category>
		<category><![CDATA[Android Structures]]></category>
		<category><![CDATA[ByRef]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13945</guid>

					<description><![CDATA[Android has been updated to support several standard Xojo language features, including: Structures Structures are a fixed-size data structure that can contain properties of simple&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Android has been updated to support several standard Xojo language features, including:</p>



<ul class="wp-block-list">
<li>Structures</li>



<li>ByRef parameters</li>



<li>Operator_Lookup</li>



<li>Operator_Convert</li>
</ul>



<h2 class="wp-block-heading">Structures</h2>



<p>Structures are a fixed-size data structure that can contain properties of simple types, such as Integer, String or Boolean.</p>



<p>Normally you would only use Structures with Declare API calls, but they can also work as a lightweight, project item specific data structure.</p>



<p>For Android, Structures are not fixed-sized data structures and are not appropriate for Declares, but they offer slightly more flexibility, especially with regard to Strings. When you add a String to an Android Structure, the specified size is ignored; you can store any size string in the property.</p>



<p>Usage is the same. Create a Structure in the Structure editor for the project item, adding the properties you want.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="221" src="https://blog.xojo.com/wp-content/uploads/2024/10/image-7-1024x221.png" alt="" class="wp-image-13946" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/image-7-1024x221.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/10/image-7-300x65.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/image-7-768x166.png 768w, https://blog.xojo.com/wp-content/uploads/2024/10/image-7-1536x332.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/10/image-7-2048x442.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Note that the Offset and Size columns are not relevant in Android since the Structure is not fixed-size.</p>



<p> In code, you create a structure by name:</p>



<pre class="wp-block-code"><code>Var st As StructTest
st.Age = 42
st.Dead = True
st.Name = "Bob Roberts"
st.Weight = 200.6</code></pre>



<p>Since Android Structures are not size-based, the ByteValue, Size and StringValue members are not useful and will raise an UnsupportedOperationException when used.</p>



<h2 class="wp-block-heading">ByRef Parameters</h2>



<p>ByRef parameters allow you to pass a parameter &#8220;by reference&#8221; so that the caller can access its new value if it was changed. By default, parameters are passed ByVal (or &#8220;by value&#8221;) so that the caller does not see any changes made to them in the method.</p>



<p>Use the ByRef keyword in front of the parameter to make it ByRef.</p>



<p>The <a href="https://documentation.xojo.com/api/language/byref.html" data-type="link" data-id="https://documentation.xojo.com/api/language/byref.html">ByRef page in the docs</a> has more information.</p>



<h2 class="wp-block-heading">Operator_Lookup</h2>



<p>Operator_Lookup might be unique to Xojo. When you add an Operator_Lookup method to a class, it essentially tells the compiler to not do a syntax check on method or property names. Instead, if the name that follows the &#8220;.&#8221; is not an actual member of the class, then the name is passed as a string parameter to the Operator_Convert method.</p>



<p>You can do some strange things with Operator_Lookup, including making your code much more difficult to debug. Use this advanced feature wisely.</p>



<p>Learn more about <a href="https://documentation.xojo.com/api/math/operator_lookup.html">Operator_Lookup in the docs</a>.</p>



<h2 class="wp-block-heading">Operator_Convert</h2>



<p><a href="https://documentation.xojo.com/api/math/operator_convert.html">Operator_Convert</a> is used with classes to allow them to either construct a new instance from a value of a different type or to allow them to return a version of itself that is compatible with the destination type.</p>



<p>Here is an example of a Person class that uses Operator_Lookup. The Person class has a property: FullName As String. This is how you might normally create an instance and assign a value to FullName:</p>



<pre class="wp-block-code"><code>// Person is a class with a property FullName As String
Var p1 As New Person
p1.FullName = "Bob Roberts"</code></pre>



<p>Now add an Operator_Convert method to the class like this:</p>



<pre class="wp-block-code"><code>Sub Operator_Convert(name As String)
  Self.FullName = name
End Sub</code></pre>



<p>With that method, you can now assign a string value to a Person variable and it will create an instance and assign the string value to the FullName property. The syntax looks like this:</p>



<pre class="wp-block-code"><code>Var p As Person
p = "Bob Roberts"</code></pre>



<p>You can also add an Operator_Convert method that returns a representation of a class instance as a different type. For example, say you wanted a Person instance to be able to convert itself to a string. First you have to decide what the string would be and in this case it makes sense to use FullName.</p>



<p>Here is that Operator_Convert for Person:</p>



<pre class="wp-block-code"><code>Function Operator_Convert As String
  Return Self.FullName
End Function</code></pre>



<p>This code then assigns a Person instance to a Label&#8217;s text property where it gets assigned what is in the FullName property:</p>



<pre class="wp-block-code"><code>Var p2 As New Person
p2.FullName = "Janet Jane"
Label1.Text = p2</code></pre>



<p>Like with Operator_Lookup, Operator_Convert is an advanced feature. Use it carefully. It certainly allows for some code to be simplified, but it also means that code might not be as clear as it would if it used more standard syntax.</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Xojo 2024r4 is Now Available!</title>
		<link>https://blog.xojo.com/2024/12/10/xojo-2024r4-is-now-available/</link>
		
		<dc:creator><![CDATA[Gabriel Ludosanu]]></dc:creator>
		<pubDate>Tue, 10 Dec 2024 16:36:12 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[2024r4]]></category>
		<category><![CDATA[App Localization]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[Code Editor]]></category>
		<category><![CDATA[Hardened Runtime]]></category>
		<category><![CDATA[Notarization]]></category>
		<category><![CDATA[Preemptive Threads]]></category>
		<category><![CDATA[Sandboxing]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=14183</guid>

					<description><![CDATA[Xojo 2024 Release 4 introduces a suite of powerful new features and enhancements, along with numerous bug fixes, further solidifying Xojo’s commitment to providing a&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Xojo 2024 Release 4 introduces a suite of powerful new features and enhancements, along with numerous bug fixes, further solidifying Xojo’s commitment to providing a robust and versatile development environment. With 33 new features added and 182 bugs fixed, Xojo 2024r4 is designed to enhance your productivity and expand your creative possibilities.</p>



<h2 class="wp-block-heading">What’s New in Xojo 2024r4</h2>



<p>Xojo 2024r4 brings a range of exciting updates that enhance cross-platform development, improve security, and provide more tools for creating dynamic and interactive applications. Here are some of the standout features:</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Android Localization</strong></p>



<p>Expand your app’s reach with comprehensive localization support for Android. Easily add translations and switch locales using the intuitive Constant Editor, allowing you to cater to a diverse, global audience without the hassle.</p>



<p><a href="https://blog.xojo.com/2024/12/10/android-localization/" data-type="link" data-id="https://blog.xojo.com/2024/12/10/android-localization/" target="_blank" rel="noreferrer noopener">Learn more about Android Localization</a></p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Extended Android Features</strong></p>



<p>We&#8217;ve enhanced Android support by integrating several standard Xojo language features, including Structures, ByRef parameters, Operator_Lookup, and Operator_Convert.</p>



<p><a href="https://blog.xojo.com/2024/12/10/android-language-features/" data-type="link" data-id="https://blog.xojo.com/2024/12/10/android-language-features/" target="_blank" rel="noreferrer noopener">Discover the Extended Android Features</a></p>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Selection Matching</strong></p>



<p>Boost your coding efficiency with the new Selection Matching feature in Xojo&#8217;s Code Editor. Quickly highlight and track all occurrences of selected text in your code, making it easier to navigate, refactor, and maintain your projects.</p>



<p><a href="https://blog.xojo.com/2024/12/10/code-editor-selection-matching/" data-type="link" data-id="https://blog.xojo.com/2024/12/10/code-editor-selection-matching/" target="_blank" rel="noreferrer noopener">Learn more about Code Selection Matching</a></p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Secure Mac Apps</strong></p>



<p>Enhance the security of your Mac applications directly from the Xojo IDE with built-in support for Sandboxing, Hardened Runtime, and Notarization. These features ensure your apps meet the latest security standards, providing a safe and trusted experience for your users.</p>



<p><a href="https://blog.xojo.com/2024/12/10/sandboxing-hardened-runtime-and-notarization-arrives-to-the-xojo-ide/" data-type="link" data-id="https://blog.xojo.com/2024/12/10/sandboxing-hardened-runtime-and-notarization-arrives-to-the-xojo-ide/" target="_blank" rel="noreferrer noopener">Learn more</a></p>
</div>
</div>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Enhanced Charts</strong></p>



<p>Take control of your data visualization with Enhanced Charts. Gain precise control over DataSets and legends, and design dynamic, interactive charts using new event handlers and properties. These improvements make it easier to create visually compelling and informative charts for your applications.</p>



<p><a href="https://blog.xojo.com/2024/12/10/more-control-over-your-charts/" target="_blank" rel="noreferrer noopener">Read about the enhanced Charts</a></p>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p><strong>Preemptive Threads</strong></p>



<p>Experience faster execution, better debugging, and smarter object handling with the enhanced Preemptive Threads. This feature maximizes your application’s performance on multi-core systems, allowing for more responsive and efficient code.</p>



<p><a href="https://blog.xojo.com/2024/12/10/sharpening-our-preemptive-threads/" target="_blank" rel="noreferrer noopener">Understand Preemptive Threads</a></p>
</div>
</div>



<p><strong>Web Framework</strong><br>Enjoy smoother and more efficient web applications with updates to Xojo&#8217;s Web Framework. Improved memory usage and numerous bug fixes ensure that your web apps run reliably and perform optimally, providing a better experience for your users.</p>



<p><a href="https://blog.xojo.com/2024/12/10/xojo-web-improvements-in-2024r4/" target="_blank" rel="noreferrer noopener">Discover Web Framework Improvements</a></p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>These updates and enhancements are designed to make your development process more efficient, productive, and enjoyable. Whether you’re building new applications or enhancing existing ones, Xojo 2024r4 provides the tools and capabilities you need to succeed.</p>



<h2 class="wp-block-heading">Get Started</h2>



<p>To learn more about Xojo 2024 Release 4 and begin your development journey, please visit the&nbsp;<a href="https://documentation.xojo.com/versions/2024r4/resources/release_notes/2024r4.html" target="_blank" rel="noreferrer noopener">Xojo 2024r4 Release Notes</a>. The update is available for download now from the&nbsp;<a href="https://xojo.com/download/" target="_blank" rel="noreferrer noopener">Xojo downloads page</a>.</p>



<h3 class="wp-block-heading">What’s Next?</h3>



<p>We’re continuously working on new features, updates, and enhancements to our platform. If you have any suggestions or ideas, please add them to the&nbsp;<a href="https://tracker.xojo.com/xojoinc/xojo">Xojo tracker</a>. We’re always looking to improve and expand Xojo to better serve our community.</p>



<p><strong>Thank you for being part of the Xojo community. We’re excited to see what you create with Xojo 2024r4!</strong></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Welcome to Mobile Orientation Orientation!</title>
		<link>https://blog.xojo.com/2024/10/07/welcome-to-mobile-orientation-orientation/</link>
		
		<dc:creator><![CDATA[Geoff Perlman]]></dc:creator>
		<pubDate>Mon, 07 Oct 2024 19:34:19 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Cross-Platform]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[mobileScreen]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13840</guid>

					<description><![CDATA[Mobile apps sometimes have to adjust to the user rotating the device from portrait mode to landscape mode and the reverse. For the most part,&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Mobile apps sometimes have to adjust to the user rotating the device from portrait mode to landscape mode and the reverse. For the most part, Xojo handles this for you. For Android projects, if you have locked controls properly and for iOS projects, if you have set the constraints properly, the controls will do the right thing when the device is rotated.</p>



<p>If there&#8217;s something you need to do in code when the orientation changes, you&#8217;re in luck. The <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilescreen.html#mobilescreen-methods">MobileScreen</a> class has an <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilescreen.html#mobilescreen-orientationchanged">OrientationChanged</a> event. When this event fires, that means the user has rotated their device and the orientation has changed. This is where your code would go should you need to respond to an orientation change.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Note: If you need to know when the screen has changed in size, that&#8217;s what the <a href="https://documentation.xojo.com/api/user_interface/mobile/mobilescreen.html#mobilescreen-resized">Resized</a> event is for (at least on iOS &#8211; it&#8217;s not yet supported for Android).</p>
</blockquote>



<p>What might not be immediately intuitive or obvious is that rotating your device does not automatically mean the orientation has changed. Consider the following example project that displays the Resized and OrientationChanged events in a table when they occur. While this is on iOS, it works the same way (without the Resized event) on Android. The device is starting in portrait mode.</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="513" height="1024" src="https://blog.xojo.com/wp-content/uploads/2024/10/1-1-513x1024.png" alt="" class="wp-image-13847" style="width:249px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/1-1-513x1024.png 513w, https://blog.xojo.com/wp-content/uploads/2024/10/1-1-150x300.png 150w, https://blog.xojo.com/wp-content/uploads/2024/10/1-1-768x1534.png 768w, https://blog.xojo.com/wp-content/uploads/2024/10/1-1-769x1536.png 769w, https://blog.xojo.com/wp-content/uploads/2024/10/1-1.png 806w" sizes="auto, (max-width: 513px) 100vw, 513px" /></figure>



<p>We will focus on just the OrientationChanged events for now. It gets an initial OrientationChanged event. Then the user rotates their phone clockwise enough that the orientation is changed from portrait to landscape.</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="1610" height="805" src="https://blog.xojo.com/wp-content/uploads/2024/10/2-1024x512.png" alt="" class="wp-image-13850" style="width:471px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/2-1024x512.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/10/2-300x150.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/2-768x384.png 768w, https://blog.xojo.com/wp-content/uploads/2024/10/2-1536x768.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/10/2.png 1610w" sizes="auto, (max-width: 1610px) 100vw, 1610px" /></figure>



<p>You can see that another OrientationChanged event has fired as you&#8217;d expect. Next the user rotates the phone clockwise again.</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="512" height="1024" src="https://blog.xojo.com/wp-content/uploads/2024/10/3-512x1024.png" alt="" class="wp-image-13851" style="width:267px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/3-512x1024.png 512w, https://blog.xojo.com/wp-content/uploads/2024/10/3-150x300.png 150w, https://blog.xojo.com/wp-content/uploads/2024/10/3-768x1536.png 768w, https://blog.xojo.com/wp-content/uploads/2024/10/3.png 806w" sizes="auto, (max-width: 512px) 100vw, 512px" /></figure>



<p>Now the phone is upside down. Notice, however, the orientation from the perspective of the OS has not changed. The layout is still in landscape orientation. This is not a bug. The device does not support portrait mode when the device is turned upside down. Thus the layout is still in landscape orientation and thus no OrientationChanged event has fired because there has been no orientation change.</p>



<p>Next the user rotates the phone clockwise yet again.</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="513" src="https://blog.xojo.com/wp-content/uploads/2024/10/4-1024x513.png" alt="" class="wp-image-13852" style="width:537px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/4-1024x513.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/10/4-300x150.png 300w, https://blog.xojo.com/wp-content/uploads/2024/10/4-768x384.png 768w, https://blog.xojo.com/wp-content/uploads/2024/10/4-1536x769.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/10/4.png 1610w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>You might think that an OrientationChanged event would fire, but it doesn&#8217;t. Why not? Because as far as the OS is concerned, the layout is still in landscape orientation. It has not changed its orientation. Finally, the user rotates the device clockwise once last time.</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="512" height="1024" src="https://blog.xojo.com/wp-content/uploads/2024/10/5-512x1024.png" alt="" class="wp-image-13853" style="width:334px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/5-512x1024.png 512w, https://blog.xojo.com/wp-content/uploads/2024/10/5-150x300.png 150w, https://blog.xojo.com/wp-content/uploads/2024/10/5-768x1536.png 768w, https://blog.xojo.com/wp-content/uploads/2024/10/5.png 806w" sizes="auto, (max-width: 512px) 100vw, 512px" /></figure>



<p>This time the orientation has changed from landscape to portrait and thus the OrientationChanged event fired. Given that the initial OrientationChanged event fired when the app launched, out of the four 90 degree clockwise rotations, only two orientation changes occurred and thus only two OrientationChanged events fired.</p>



<p>This is one of those cases where what is initially intuitive turns out to be wrong until you look more closely at what is really going on.</p>



<p><em>Geoff Perlman is the Founder and CEO of Xojo. When he’s not leading the Xojo team he can be found playing drums in Austin, Texas and spending time with his family.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Generating a Unique UUID in Xojo for Android</title>
		<link>https://blog.xojo.com/2024/10/02/generating-a-unique-uuid-in-xojo-for-android/</link>
		
		<dc:creator><![CDATA[Xojo]]></dc:creator>
		<pubDate>Wed, 02 Oct 2024 15:00:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[UUID]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13838</guid>

					<description><![CDATA[In the world of mobile app development, it’s often necessary to generate a universally unique identifier (UUID) to identify data or devices uniquely. If you’re&#8230;]]></description>
										<content:encoded><![CDATA[
<p>In the world of mobile app development, it’s often necessary to generate a universally unique identifier (UUID) to identify data or devices uniquely. If you’re a Xojo developer building apps for Android, you can easily generate a UUID using the function below. This function leverages the built-in UUID generation from Android’s Java class library.</p>



<h2 class="wp-block-heading">What is a UUID?</h2>



<p>A UUID (Universally Unique Identifier) is a 128-bit value that is unique worldwide. UUIDs are commonly used in software development to identify objects and have the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where each “x” is a hexadecimal digit.</p>



<h2 class="wp-block-heading">The Code: GenerateUUID</h2>



<p>The following code shows a simple Xojo function that uses the built-in Java method on Android to generate a UUID. The function allows you to create the UUID either with or without hyphens, depending on your project requirements.</p>



<h3 class="wp-block-heading">The Code:</h3>



<pre class="wp-block-code xojo"><code>Function GenerateUUID(useHyphens As Boolean = True) As String
' https://developer.android.com/reference/java/util/UUID
  Declare Function generateUUID Lib "java.util.UUID" Alias "randomUUID().toString" As CString

  Var uuid As String = generateUUID

  If useHyphens Then
    Return uuid
  Else
    Return uuid.ReplaceAll("-", "")
  End If
End Function</code></pre>



<h3 class="wp-block-heading">Code Explanation:</h3>



<p>● <em>Declare Function generateUUID</em>: This <em>Declare </em>statement gives us access to Android’s native Java library. We use the shared <em>randomUUID </em>method from the <em>java.util.UUID </em>class to generate a random UUID. This method returns the UUID as a string.</p>



<p>● <em>Var uuid As String = generateUUID</em>: The generated UUID is stored as a string.</p>



<p>● &nbsp;<em>useHyphens</em>: This optional parameter controls whether the UUID is returned with or without hyphens. The default value is <em>True</em>, meaning the UUID will be returned in its usual format with hyphens.</p>



<p>● &nbsp;<em>If useHyphens Then &#8230; Else</em>: Depending on the value of <em>useHyphens</em>, either the standard UUID is returned or a hyphen-free version, where the <em>ReplaceAll </em>method is used to replace all hyphens with an empty string. </p>



<h2 class="wp-block-heading">Use in Your Android Project: </h2>



<p>1. <em>UUID with Hyphens</em>: If you want to get the UUID in its standard format with hyphens, you can call the function without any arguments: </p>



<pre class="wp-block-code"><code>Var myUUID As String = GenerateUUID 
' Example result: 123e4567-e89b-12d3-a456-426614174000 </code></pre>



<p>2. <em>UUID without Hyphens</em>: If you prefer a UUID without hyphens, you can pass the argument <em>False </em>to the function: </p>



<pre class="wp-block-code"><code>Var myUUID As String = GenerateUUID(False) 
' Example result: 123e4567e89b12d3a456426614174000 </code></pre>



<h2 class="wp-block-heading">Why Use UUIDs? </h2>



<p>UUIDs are ideal for cases where you need to ensure that every generated identifier is unique, even if they are generated by different devices or systems. Some common use cases in Android development with Xojo include:</p>



<p>● &nbsp;Uniquely identifying users or devices</p>



<p>● &nbsp;Creating keys for database entries</p>



<p>● &nbsp;Tagging objects in a distributed application where no identifier conflicts should occur</p>



<p>With the GenerateUUID<em> </em>function, you can easily generate a unique UUID on Android devices using Xojo, without worrying about the complexities of native Android APIs. This method integrates seamlessly into your Android application and offers the flexibility to generate UUIDs with or without hyphens. If you’re working on a project where uniqueness is crucial, using UUIDs should be at the top of your list. </p>



<p>Good luck with your Android project in Xojo!</p>



<p><em>Martin T. is a Xojo MVP and has been very involved in testing Android support.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Android Design Extensions 3.0 for Xojo 2024r3+</title>
		<link>https://blog.xojo.com/2024/10/01/android-design-extensions-3-0-for-xojo-2024r3/</link>
		
		<dc:creator><![CDATA[Martin T.]]></dc:creator>
		<pubDate>Tue, 01 Oct 2024 15:55:28 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Android Design Extensions]]></category>
		<category><![CDATA[Declares]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13827</guid>

					<description><![CDATA[Version 2024r3 of Xojo has just been released. So it&#8217;s time for an update of the Android Design Extension 3.0. This version works from version&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Version 2024r3 of Xojo has just been released. So it&#8217;s time for an update of the Android Design Extension 3.0. This version works from version 2024r3+, because in this version Xojo has revised the Declare Framework enormously and Declares now work in Android projects in the same way as in the other targets. This means that we are no longer bound to the Object Declares introduced in Android. So what are the new features of the Android Design Extensions 3.0?</p>



<p>From now on, Buttons and TextFields can use Xojo Pictures directly and you no longer need to save images that you want to use. Take a look at the “Deprecations Version 3.0” section in the Read me to find out which methods are deprecated in this regard.</p>



<h2 class="wp-block-heading">Now it&#8217;s getting colorful!</h2>



<p>In this version, support for over 180 system colors has been added, depending on which Android version your app is running on. The sample app has a new page with the system colors. It gives you a good overview. Using these colors can help you to design your apps according to the Material Design Guidelines in light &amp; dark mode.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="498" height="1024" src="https://blog.xojo.com/wp-content/uploads/2024/10/android-screenshots-1-498x1024.png" alt="" class="wp-image-13831" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/android-screenshots-1-498x1024.png 498w, https://blog.xojo.com/wp-content/uploads/2024/10/android-screenshots-1-146x300.png 146w, https://blog.xojo.com/wp-content/uploads/2024/10/android-screenshots-1-768x1579.png 768w, https://blog.xojo.com/wp-content/uploads/2024/10/android-screenshots-1-747x1536.png 747w, https://blog.xojo.com/wp-content/uploads/2024/10/android-screenshots-1-996x2048.png 996w, https://blog.xojo.com/wp-content/uploads/2024/10/android-screenshots-1.png 1080w" sizes="auto, (max-width: 498px) 100vw, 498px" /></figure>



<p>Picture objects and the content of a MobileHTMLViewer can now also be printed.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="996" height="1024" src="https://blog.xojo.com/wp-content/uploads/2024/10/android-made-with-xojo-996x1024.png" alt="" class="wp-image-13829" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/android-made-with-xojo-996x1024.png 996w, https://blog.xojo.com/wp-content/uploads/2024/10/android-made-with-xojo-292x300.png 292w, https://blog.xojo.com/wp-content/uploads/2024/10/android-made-with-xojo-768x789.png 768w, https://blog.xojo.com/wp-content/uploads/2024/10/android-made-with-xojo-1494x1536.png 1494w, https://blog.xojo.com/wp-content/uploads/2024/10/android-made-with-xojo-1993x2048.png 1993w" sizes="auto, (max-width: 996px) 100vw, 996px" /></figure>



<p>We are familiar with the DrawInto method from the Desktop Framework, which draws DesktopUIControls and DesktopWindows into a Graphics object. These methods have now also been added for MobileUIControls and MobileScreen.</p>



<p>The title bar and the NavigationBar can now also be highlighted in color. The font, color and alignment of the NavigationBar can also be changed.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="498" height="1024" src="https://blog.xojo.com/wp-content/uploads/2024/10/android-019EFFD9-4A4A-48A1-A477-B1948F7B9D58-498x1024.png" alt="" class="wp-image-13832" srcset="https://blog.xojo.com/wp-content/uploads/2024/10/android-019EFFD9-4A4A-48A1-A477-B1948F7B9D58-498x1024.png 498w, https://blog.xojo.com/wp-content/uploads/2024/10/android-019EFFD9-4A4A-48A1-A477-B1948F7B9D58-146x300.png 146w, https://blog.xojo.com/wp-content/uploads/2024/10/android-019EFFD9-4A4A-48A1-A477-B1948F7B9D58-768x1579.png 768w, https://blog.xojo.com/wp-content/uploads/2024/10/android-019EFFD9-4A4A-48A1-A477-B1948F7B9D58-747x1536.png 747w, https://blog.xojo.com/wp-content/uploads/2024/10/android-019EFFD9-4A4A-48A1-A477-B1948F7B9D58-996x2048.png 996w, https://blog.xojo.com/wp-content/uploads/2024/10/android-019EFFD9-4A4A-48A1-A477-B1948F7B9D58.png 1080w" sizes="auto, (max-width: 498px) 100vw, 498px" /></figure>



<h2 class="wp-block-heading">How? What? Where?</h2>



<p>The system paths for various folders (SpecialFolder) have also been added.</p>



<p>Almost all modules have been updated according to the new Declare data types. The example app has also been further optimized for dark mode in this version.</p>



<p>The new Declare capabilities in Xojo 2024r3 are another huge step forward. You now have the possibility to declare in almost every Android API without having to go through an Android library.</p>



<p>Feel free to take a look at the developer repository, create feature requests, and provide feedback on extending this extension library.</p>



<p>I’m happy to receive any voluntary financial support for the work I’ve done so far, which you are welcome to <a href="https://www.paypal.com/paypalme/MTrippensee" target="_blank" rel="noreferrer noopener">share here</a>. You can download the project with many examples at <a href="https://github.com/XojoGermany/AndroidDesignExtensions" target="_blank" rel="noreferrer noopener">https://github.com/XojoGermany/AndroidDesignExtensions</a>.</p>



<p>Happy coding.</p>



<p><em>Martin T. is a Xojo MVP and has been very involved in testing Android support.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Android Tablet Support</title>
		<link>https://blog.xojo.com/2024/10/01/android-tablet-support/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 01 Oct 2024 15:31:26 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[2024r3]]></category>
		<category><![CDATA[Cats]]></category>
		<category><![CDATA[Layout Editor]]></category>
		<category><![CDATA[Tablet]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13552</guid>

					<description><![CDATA[Android apps made with Xojo have always worked on tablets, but until Xojo 2024r3 there has been no easy way to design your screens for&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Android apps made with Xojo have always worked on tablets, but until Xojo 2024r3 there has been no easy way to design your screens for tablets. Below are the new features that should make it easier to create Android tablet apps.</p>



<h2 class="wp-block-heading">Layout Editor</h2>



<p>The Layout Editor has been enhanced with two settings that can adjust the layout.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="288" height="62" src="https://blog.xojo.com/wp-content/uploads/2024/08/image-4.png" alt="" class="wp-image-13553"/></figure>



<p>The command bar has two toggle buttons. The first one already existed and it is for displaying the layout in portrait (the default) or landscape.</p>



<p>The new toggle button displays the layout in a phone size (the default) or a tablet size. When you switch between any of these toggles, the locking is applied to the controls on the layout.</p>



<p>The layout editor also remembers the selections so that the next time you visit the layout, it will be where you left it. Here you can see a landscape tablet layout:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="793" src="https://blog.xojo.com/wp-content/uploads/2024/08/image-5-1024x793.png" alt="" class="wp-image-13554" srcset="https://blog.xojo.com/wp-content/uploads/2024/08/image-5-1024x793.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/08/image-5-300x232.png 300w, https://blog.xojo.com/wp-content/uploads/2024/08/image-5-768x595.png 768w, https://blog.xojo.com/wp-content/uploads/2024/08/image-5-1536x1189.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/08/image-5-2048x1585.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Default Screen</h2>



<p>The App Inspector has an additional Default Tablet Screen property. When your app is launched on a phone or tablet-sized device, the specified screen is what gets displayed.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="634" height="218" src="https://blog.xojo.com/wp-content/uploads/2024/08/image-6.png" alt="" class="wp-image-13555" srcset="https://blog.xojo.com/wp-content/uploads/2024/08/image-6.png 634w, https://blog.xojo.com/wp-content/uploads/2024/08/image-6-300x103.png 300w" sizes="auto, (max-width: 634px) 100vw, 634px" /></figure>



<p>You can also choose &#8220;None&#8221; for a default screen if you just want to share a single screen across both types of devices.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>If you choose &#8220;None&#8221; for the Default Phone Screen, then the app won&#8217;t launch on a phone. If you choose &#8220;None&#8221; for a Default Tablet Screen, the app will launch on the tablet using the Default Phone Screen, which matches prior behavior.</p>
</blockquote>



<h2 class="wp-block-heading">Design Considerations</h2>



<p>Xojo for Android uses locking to automatically adjust controls on the layout. Locking will work for certain types of layouts that you want to run on both phones and tablets, but may not be sufficient for more complex layouts. In these situations, you are better served by designing completely separate layouts for phone and tablet and then using the above Default Screen properties to show the correct one.</p>



<p>When you need to show additional screens, you can show the phone or tablet screen in code by checking the device using DeviceData.Orientation and DeviceData.UserInterfaceType.</p>



<pre class="wp-block-code"><code>If System.Device.UserInterfaceType = SystemDeviceData.UserInterfaceTypes.Tablet Then
  // Show tablet screen
  myTabletScreen.Show
Else
  // Show phone screen
  myPhoneScreen.Show
End If</code></pre>



<p>When you have multiple screens, it often makes sense to put the UI in containers and then use the containers on the different screens.</p>



<p>You can run your apps on a Tablet emulator for testing (you can create one using Android Studio) or you can debug directly on device. I enabled on-device debugging for a Lenovo Tab M10 Plus 3rd Gen with these steps:</p>



<ul class="wp-block-list">
<li>Go to Settings.</li>



<li>Select About tablet.</li>



<li>Tap 7 times in a row on the build number. This enabled Developer options. You may be prompted to enter your PIN.</li>



<li>Select System and then Developer Options.</li>



<li>Turn on USB debugging and give it permission.</li>
</ul>



<p>The tablet will now appear as a debug device in Xojo, allowing you to run your Android projects on it.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="3552" height="2893" src="https://blog.xojo.com/wp-content/uploads/2024/09/D0D09B0C-7135-4067-A893-29D1420CAA14.png" alt="" class="wp-image-13724" srcset="https://blog.xojo.com/wp-content/uploads/2024/09/D0D09B0C-7135-4067-A893-29D1420CAA14.png 3552w, https://blog.xojo.com/wp-content/uploads/2024/09/D0D09B0C-7135-4067-A893-29D1420CAA14-300x244.png 300w, https://blog.xojo.com/wp-content/uploads/2024/09/D0D09B0C-7135-4067-A893-29D1420CAA14-1024x834.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/09/D0D09B0C-7135-4067-A893-29D1420CAA14-768x626.png 768w, https://blog.xojo.com/wp-content/uploads/2024/09/D0D09B0C-7135-4067-A893-29D1420CAA14-1536x1251.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/09/D0D09B0C-7135-4067-A893-29D1420CAA14-2048x1668.png 2048w" sizes="auto, (max-width: 3552px) 100vw, 3552px" /></figure>



<h2 class="wp-block-heading">What about Chromebook?</h2>



<p><a href="https://www.chromium.org/chromium-os/chrome-os-systems-supporting-android-apps/" target="_blank" rel="noreferrer noopener">Some Chromebooks</a> are <a href="https://support.google.com/chromebook/answer/7021273" target="_blank" rel="noreferrer noopener">able to run Android apps</a> and <a href="https://www.chromium.org/chromium-os/chrome-os-systems-supporting-android-apps/" target="_blank" rel="noreferrer noopener">those that can</a> are also able to run Xojo&#8217;s Android apps. Android apps can be installed via the Play Store (give <a href="https://play.google.com/store/apps/details?id=com.xojo.catsup&amp;hl=en_US&amp;pli=1" target="_blank" rel="noreferrer noopener">CatsUp a try</a>) or manually, although doing it manually is rather difficult (I have not yet gotten that working on my Chromebook). The Play Store options works well, however. Here&#8217;s CatsUp from the Play Store running on my Lenovo 300e Chromebook:</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="768" src="https://blog.xojo.com/wp-content/uploads/2024/08/F98FE354-8315-4BCA-B204-C9D24EE0B86B_1_102_o-1024x768.jpeg" alt="" class="wp-image-13576" style="width:913px;height:auto" srcset="https://blog.xojo.com/wp-content/uploads/2024/08/F98FE354-8315-4BCA-B204-C9D24EE0B86B_1_102_o-1024x768.jpeg 1024w, https://blog.xojo.com/wp-content/uploads/2024/08/F98FE354-8315-4BCA-B204-C9D24EE0B86B_1_102_o-300x225.jpeg 300w, https://blog.xojo.com/wp-content/uploads/2024/08/F98FE354-8315-4BCA-B204-C9D24EE0B86B_1_102_o-768x576.jpeg 768w, https://blog.xojo.com/wp-content/uploads/2024/08/F98FE354-8315-4BCA-B204-C9D24EE0B86B_1_102_o-1536x1152.jpeg 1536w, https://blog.xojo.com/wp-content/uploads/2024/08/F98FE354-8315-4BCA-B204-C9D24EE0B86B_1_102_o.jpeg 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>When run on the Chromebook, Android apps can have a size of Phone, Tablet or Resizable. You can see that as an option in the title bar of the above screenshot. For best results you probably want to design your apps for a landscape tablet.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Xojo for Android does not have direct support for Chromebook features at this time, but if there is something you&#8217;d like to see, be sure to create an Issue so that we can look into it.</p>
</blockquote>



<p>Since Chromebooks are just (low-end) Linux machines at their core, they can technically run Xojo Linux apps (x86 or ARM depending on the Chromebook), but this usually requires some sort of <a href="https://support.google.com/chromebook/answer/9145439" target="_blank" rel="noreferrer noopener">additional Linux installation</a>.</p>



<p>And of course, Chromebooks are typically meant to run web apps, which Xojo can also do quite well.</p>



<h2 class="wp-block-heading">Eddie&#8217;s Electronics Example Project</h2>



<p>The Android Eddie&#8217;s Electronics example project has been updated to run on both phones and tablets. It makes use of Containers to contain the UI and displays them using screens for the appropriate device type.</p>



<p>Here you can see the Customer screen for a tablet displays the list of customers on the left, with details and invoices on the right.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="676" src="https://blog.xojo.com/wp-content/uploads/2024/08/image-7-1024x676.png" alt="" class="wp-image-13557" srcset="https://blog.xojo.com/wp-content/uploads/2024/08/image-7-1024x676.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/08/image-7-300x198.png 300w, https://blog.xojo.com/wp-content/uploads/2024/08/image-7-768x507.png 768w, https://blog.xojo.com/wp-content/uploads/2024/08/image-7-1536x1014.png 1536w, https://blog.xojo.com/wp-content/uploads/2024/08/image-7.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Compare that to the phone version which has you navigate between that information using separate screens.</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="483" height="1024" src="https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-ncsc-483x1024.png" alt="" class="wp-image-13564" srcset="https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-ncsc-483x1024.png 483w, https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-ncsc-142x300.png 142w, https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-ncsc-768x1628.png 768w, https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-ncsc-725x1536.png 725w, https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-ncsc.png 850w" sizes="auto, (max-width: 483px) 100vw, 483px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="485" height="1024" src="https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-ncyb-485x1024.png" alt="" class="wp-image-13565" srcset="https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-ncyb-485x1024.png 485w, https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-ncyb-142x300.png 142w, https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-ncyb-768x1620.png 768w, https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-ncyb-728x1536.png 728w, https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-ncyb.png 856w" sizes="auto, (max-width: 485px) 100vw, 485px" /></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="482" height="1024" src="https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-nddd-482x1024.png" alt="" class="wp-image-13566" srcset="https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-nddd-482x1024.png 482w, https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-nddd-141x300.png 141w, https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-nddd-768x1632.png 768w, https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-nddd-723x1536.png 723w, https://blog.xojo.com/wp-content/uploads/2024/08/SCR-20240829-nddd.png 852w" sizes="auto, (max-width: 482px) 100vw, 482px" /></figure>
</div>
</div>



<p>Tablet supports opens up a whole other category of users for your Android apps and should be particularly useful to those making bespoke apps for clients.</p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Android Declare and Library Enhancements</title>
		<link>https://blog.xojo.com/2024/10/01/android-declare-and-library-enhancements/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Tue, 01 Oct 2024 15:30:45 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[2024r3]]></category>
		<category><![CDATA[Declares]]></category>
		<category><![CDATA[Kotlin]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13442</guid>

					<description><![CDATA[There have been several enhancements to Declare and Kotlin Library support in Xojo 2024 Release 3 which, along with previous improvements, should allow you to&#8230;]]></description>
										<content:encoded><![CDATA[
<p>There have been several enhancements to Declare and Kotlin Library support in Xojo 2024 Release 3 which, along with previous improvements, should allow you to interface your Android projects with more from the native ecosystem.</p>



<p>This post describes the things you can do with Declares and Libraries with Android projects.</p>



<h2 class="wp-block-heading">Declare Integer Types</h2>



<p>The size-specific Integer types are now precise when used with Declares. The mappings are as follows:</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><td><strong>Xojo Type</strong></td><td><strong>Kotlin Type</strong></td></tr><tr><td>Int8, Byte</td><td>Byte</td></tr><tr><td>UInt8</td><td>UByte</td></tr><tr><td>Int16</td><td>Short</td></tr><tr><td>UInt16</td><td>UShort</td></tr><tr><td>Int32</td><td>Int</td></tr><tr><td>UInt32</td><td>UInt</td></tr><tr><td>Integer, Int64</td><td>Long</td></tr><tr><td>UInteger, UInt64</td><td>ULong</td></tr></tbody></table></figure>



<p>When mapping to Android API functions or Library functions, be sure to use the correct Xojo type that matches what is expected on Android. By far you will use Int32 and Integer.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>If you previously created Declares, you will likely need to change usage of Integer to Int32 as the mapping for that have changed compared to prior versions.</p>
</blockquote>



<h2 class="wp-block-heading">Nullable Types</h2>



<p>Xojo object variables (also properties, parameters and return values) can be Nil. With Kotlin, the default is that these things cannot be null (the equivalent of Nil). To ensure that you don’t get compile errors with your parameters, declare them as nullable in Kotlin by appending the “?” to the end of the type name.</p>



<h2 class="wp-block-heading">Application Context</h2>



<p>Many Android APIs require the application context. This is not available in a Library so it has to be supplied by the app itself. There is a property for this:</p>



<pre class="wp-block-code"><code>MobileApplication.AndroidContextHandle As Ptr</code></pre>



<p>You can pass this value to a function on the Library that then either saves it or uses it directly.</p>



<h2 class="wp-block-heading">Using Ptr</h2>



<p>Xojo uses the Ptr type to interface with Declares, however Kotlin does not have a Ptr type. Instead the Any type is used with Kotlin. This means that if you are passing something that is a Ptr to Kotlin (such as the app context above), your library function declaration should use “Any?” as the type of the parameter.</p>



<p>In your function, cast the parameter to the actual type you want. The same rule applies to return values. If the return value in the Declare is a Ptr, then in Kotlin the function declaration should be “Any?”.</p>



<p>You can also use Ptr with API calls to save object references as described below.</p>



<h2 class="wp-block-heading">Library Permissions</h2>



<p>Depending on the API you are using, you may need to add permissions to the app manifest.xml for the Library. These permissions also need to be applied to the main app. This can be done using the Advanced tab of the Android Build Settings. There you’ll find the Permissions property in the Inspector where you can add one Permission per line.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Previous versions let you separate permissions by spaces or commas. Going forward, each permission must be on its own line. Empty lines are ignored.</p>
</blockquote>



<p>There you can add the permission constants that are required by your Library. In addition, you can follow the constant with additional attributes and they will also be applied to the app’s manifest file.</p>



<p>For example, to include the android:maxSdkVersion attribute with the BLUETOOTH permission:</p>



<pre class="wp-block-code"><code>android.permission.BLUETOOTH android:maxSdkVersion="30"</code></pre>



<h2 class="wp-block-heading">Library Dependencies</h2>



<p>Similarly to permissions, your Library may make use of additional dependencies, which could even be other Libraries. These are added to the build.gradle file for the Library, but also need to be included in the main app.</p>



<p>You can add these dependencies using the Dependencies property on the Advanced Android Build Settings.</p>



<h2 class="wp-block-heading">Creating Objects</h2>



<p>Previous versions of Xojo only let you call Companion (essentially shared) methods on Library classes. Now you can also work with class instances and call instance methods. This gives you even better control and ability to interface with Android APIs.</p>



<p>To create an object, your Library class should have a factory method on the Companion that returns a new instance. It is clearest to use create() as this method name.</p>



<p>In Xojo you create a Declare to this create() method and call it, saving the result in a Ptr.</p>



<pre class="wp-block-code"><code>Declare Function create Lib "com.example.utility.counter" () As Ptr<br>Var counter As Ptr = create</code></pre>



<p>Instead of using a shared factory method, you can also call the Class constructor using this syntax:</p>



<pre class="wp-block-code"><code>Declare Function counter Lib "com.example.utility.counter" () As Ptr</code></pre>



<p>Because the function name has the same name as the class itself, this will call the constructor of the class.</p>



<p>When you want to call a method on the instance, you pass the instance as a Ptr. First, Declare to the method adding “.instance” to the library location to indicate you are calling a class instance.</p>



<pre class="wp-block-code"><code>Declare Function increment Lib "com.example.utility.counter.instance" (ref As Ptr) As Integer</code></pre>



<p>Then you can call the method and save its value.</p>



<pre class="wp-block-code"><code>Var count As Integer = increment(counter)</code></pre>



<p>The reference as the Ptr must be the first parameter passed in the Declare. Follow it with other parameters as usual.</p>



<p>You can also call instance methods directly in the Android API in this manner.</p>



<h2 class="wp-block-heading">Method Callbacks</h2>



<p>There are Android APIs that use callbacks to methods that you provide. In Xojo these methods are Delegates and are methods that you supply using <a href="https://documentation.xojo.com/api/language/addressof.html#addressof" target="_blank" rel="noreferrer noopener">AddressOf</a>. It is very important that the signature of this method exactly matches what the callback expects which means you’ll be limited to just the Boolean and Ptr types.</p>



<p>If you want to use an API that uses its own callbacks, you’ll be better served by creating a Library and having the API do the callback to your own Library methods, which you can then call back to your Xojo methods.</p>



<p>You can pass the reference to the Xojo method using AddressOf like this:</p>



<pre class="wp-block-code"><code>Var cb As Ptr = AddressOf TestCallback<br>Declare Sub xojocallback Lib "com.example.utility.callback" (cb As Ptr)<br>xojocallback(cb)</code></pre>



<p>The Xojo method can only use parameter types of Boolean and Ptr. It looks like this:</p>



<pre class="wp-block-code"><code>Public Sub TestCallback(b As Boolean, i As Ptr, s As Ptr)</code></pre>



<p>In the Kotlin library you have to cast the incoming parameter to a function reference. This is a two-step process where you verify the function has the correct number of parameters and then you cast it to the specific parameter types. Sample code:</p>



<pre class="wp-block-code"><code>if (cb is Function3&lt;*, *, *, *&gt;) {
    try {
         (cb as Function3&lt;Boolean, Long, String, Unit&gt;).invoke(true, 42, "Hello")
         println("Sent callback to Xojo")
    } catch (e: ClassCastException) {
         println("Casting failed: ${e.message}")
    }
}</code></pre>



<p>The &#8220;Function3&#8221; indicates a function with 3 parameters (the last &#8220;*&#8221; indicates the return type), but you can change that as needed using Function1, Function2, etc. You can pass anything back through a Ptr type, but the Xojo code has to convert them using Ptr methods so you should not change the types of the values you send back to be different than what your Xojo code expects.</p>



<h2 class="wp-block-heading">Object Declares</h2>



<p>Object Declares are not new, but for completeness are described here. Essentially an Object Declare uses special syntax to Declare to a UI control.</p>



<p>The typical way to use an Object Declare is by adding an Extends method to a Module. For example, an extension method to allow MobileButton to change its colors could look like this:</p>



<pre class="wp-block-code"><code>SetBackColor(Extends ctrl As MobileButton, c As Color)</code></pre>



<p>The Object Declare looks like this:</p>



<pre class="wp-block-code xojo"><code>Declare Sub setBackgroundColor Lib "Object:ctrl:MobileButton" (myColor As Int32)
setBackgroundColor(c.ToInteger)</code></pre>



<p>Breaking this down, we’re calling the setBackgroundColor function. The Lib denotes this new type of Object declare: an Object, separated by a colon, the Xojo name of the object (in this case, our “ctrl” parameter), followed by another colon, and the Xojo type of the object.</p>



<h2 class="wp-block-heading">Kotlin Declares</h2>



<p>You can use the Android-specific  &#8220;Kotlin&#8221; Declare designation to indicates that what is specified in the Alias section of the Declare should be used as is. This is particularly helpful when you want to cast Ptr values to a specific type for use with OS APIs.</p>



<p>This code gets a ColorStateList object for a Xojo Color value:</p>



<pre class="wp-block-code"><code>Var c As Color = Color.Blue

Declare Function valueOf Lib "android.content.res.ColorStateList:Kotlin" Alias _
"android.content.res.ColorStateList.valueOf(android.graphics.Color.argb(alpha.toInt(), r.toInt(), g.toInt(), b.toInt()))" _
(alpha As Int32, r As Int32, g As Int32, b As Int32) As Ptr

Var csl As Ptr = valueOf(255 - c.Alpha, c.Red, c.Green, c.Blue)</code></pre>



<p>This code can then be used to call <a href="https://developer.android.com/reference/com/google/android/material/button/MaterialButton#setStrokeColor(android.content.res.ColorStateList)" target="_blank" rel="noreferrer noopener">setStrokeColor</a> on a MobileButton:</p>



<pre class="wp-block-code"><code>Declare Sub import Lib "android.content.res.ColorStateList:Import" // Imports the ColorStateList class

Declare Sub setStrokeColor Lib "Object:ctrl:MobileDateTimePicker:Kotlin" Alias "setStrokeColor(strokecolor as ColorStateList)" (strokeColor As Ptr)
setStrokeColor(csl)</code></pre>



<p>As you can see, in the Alias is the Kotlin method call that casts the incoming Ptr value to a ColorStateList.</p>



<h3 class="wp-block-heading">Import</h3>



<p>Note the &#8220;import&#8221; declare in the code snippet above. This is also specific to Android. This Declare indicates that a specific class should be imported so that it can be used for casting purposes. If you left off that import, then the cast to ColorStateList would cause a compile error because ColorStateList would not be known.</p>



<p>You only need to import a specific class once. After you&#8217;ve done so it can be referenced by any other Declare, even ones in different methods.</p>



<p>The use of an import Declare is optional and is meant to simply the Kotlin method call code in the Alias. Instead of using import you can specify the full class path in the cast like this:</p>



<pre class="wp-block-code xojo"><code>Declare Sub setStrokeColor Lib "Object:ctrl:MobileDateTimePicker:Kotlin" Alias "setStrokeColor(strokecolor as android.content.res.ColorStateList)" (strokeColor As Ptr)
setStrokeColor(csl)</code></pre>



<h2 class="wp-block-heading">Handles</h2>



<p>Many classes in the framework now have Handle properties (or methods) which you can use with various Declare techniques described above. These include: FolderItem, Font, GraphicsPath, Locale, TimeZone, Graphics, Picture. In addition, the mobile controls have Handle properties that can serve as an alternative for an Object Declare.</p>



<h2 class="wp-block-heading">Sample Project</h2>



<p>You can download the sample project that demonstrates a library and some of the concepts described above. You can use this as a template or starting point for creating your own libraries or Declares.</p>



<p><a href="https://files.xojo.com/BlogExamples/UtilityLibrary2.zip" target="_blank" rel="noreferrer noopener">Sample Utility Library Project</a></p>



<p>You might also want to take a look at the <a href="https://github.com/XojoGermany/AndroidDesignExtensions" target="_blank" rel="noreferrer noopener">Android Design Extensions open source project</a>, which has hundreds of Declares that can enhance your Android apps.</p>



<h2 class="wp-block-heading">References</h2>



<ul class="wp-block-list">
<li><a href="https://blog.xojo.com/2023/08/15/creating-an-android-library-with-kotlin-for-use-with-xojo/" target="_blank" rel="noreferrer noopener">Android Libraries blog post</a></li>



<li><a href="https://blog.xojo.com/2023/08/09/android-declares/" target="_blank" rel="noreferrer noopener">Android Declares blog post</a></li>
</ul>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Android Design Extensions 2.6 for Xojo 2024r2+</title>
		<link>https://blog.xojo.com/2024/07/02/android-design-extensions-2-6-for-xojo-2024r2/</link>
		
		<dc:creator><![CDATA[Martin T.]]></dc:creator>
		<pubDate>Tue, 02 Jul 2024 17:39:59 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[2024r2]]></category>
		<category><![CDATA[Android Design Extensions]]></category>
		<category><![CDATA[Mobile]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13292</guid>

					<description><![CDATA[Xojo 2024r2 has just been released and it’s time to update the Android Design Extension which is now available in version 2.6.]]></description>
										<content:encoded><![CDATA[
<p>Xojo 2024r2 has just been released and it’s time to update the Android Design Extension which is now available in version 2.6.</p>



<p>This small update runs exclusively for all Xojo 2024r2+ versions and now offers methods to access a few more system details, such as specific folders (MobileApplication.GetCacheDirXC, GetDataDirXC, GetFilesDirXC, etc.) or methods for checking screen properties like MobileApplication.IsScreenHdrXC, IsScreenRoundXC, ScreenHeightDpXC, or ScreenWidthDpXC.</p>



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="996" height="1024" src="https://blog.xojo.com/wp-content/uploads/2024/07/7092BD62-5376-40EE-B3D8-3671D92BFA6F-996x1024.jpg" alt="" class="wp-image-13293" srcset="https://blog.xojo.com/wp-content/uploads/2024/07/7092BD62-5376-40EE-B3D8-3671D92BFA6F-996x1024.jpg 996w, https://blog.xojo.com/wp-content/uploads/2024/07/7092BD62-5376-40EE-B3D8-3671D92BFA6F-292x300.jpg 292w, https://blog.xojo.com/wp-content/uploads/2024/07/7092BD62-5376-40EE-B3D8-3671D92BFA6F-768x789.jpg 768w, https://blog.xojo.com/wp-content/uploads/2024/07/7092BD62-5376-40EE-B3D8-3671D92BFA6F-1494x1536.jpg 1494w, https://blog.xojo.com/wp-content/uploads/2024/07/7092BD62-5376-40EE-B3D8-3671D92BFA6F.jpg 1512w" sizes="auto, (max-width: 996px) 100vw, 996px" /></figure>



<p>Feel free to take a look at the developer repository, create feature requests, and provide feedback on extending this extension library.</p>



<p>I’m happy to receive any voluntary financial support for the work I’ve done so far, which you are welcome to <a href="https://www.paypal.com/paypalme/MTrippensee">share</a> here. You can download the project with many examples at <a href="https://github.com/XojoGermany/AndroidDesignExtensions">https://github.com/XojoGermany/AndroidDesignExtensions</a>.</p>



<p>Happy coding.</p>



<p><em>Martin T. is a Xojo MVP and has been very involved in testing Android support.</em></p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Android: New Features and Improvements</title>
		<link>https://blog.xojo.com/2024/06/26/android-new-features-and-improvements/</link>
		
		<dc:creator><![CDATA[Paul Lefebvre]]></dc:creator>
		<pubDate>Wed, 26 Jun 2024 15:00:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[2024r2]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=13222</guid>

					<description><![CDATA[Although still in Beta, there have been many improvements to Android in the last few releases and in this post I’ll highlight a few things that have been added or improved starting with Xojo 2023r4 and through the recently released 2024r2.]]></description>
										<content:encoded><![CDATA[
<p>First released last summer as a Beta, Xojo’s Android support continues to grow and evolve.</p>



<p>Although still in Beta, there have been many improvements to Android in the last few releases and in this post I’ll highlight a few things that have been added or improved starting with Xojo 2023r4 and through the recently released 2024r2.</p>



<h2 class="wp-block-heading">Xojo 2023r4</h2>



<p>The final release of 2023 had a lot of Android improvements.</p>



<p>You should always read the <a href="https://documentation.xojo.com/resources/release_notes/2023r4.html">entire release notes</a>, which have a wealth of details, but here are some highlights of useful new features that were added to Android in 2023r4:</p>



<ul class="wp-block-list">
<li>Added <strong>System.DismissKeyboard</strong> method that can be used to hide the virtual keyboard.</li>



<li>The <strong>Ptr</strong> type can be used with Declares that call <a href="https://blog.xojo.com/2023/08/15/creating-an-android-library-with-kotlin-for-use-with-xojo/">Kotlin Library projects</a>. Other usage of Ptr will result in a compile error.</li>



<li>There is a new constructor on <strong>Font</strong> that allows you to load a font file from a FolderItem. <a href="https://blog.xojo.com/2024/02/26/android-quick-tip-read-and-use-installed-fonts/">Easy custom fonts</a>!</li>



<li>The <strong>Barcode</strong> class can be used to <a href="https://blog.xojo.com/2023/12/12/scanning-a-qr-code-from-an-android-app/">scan a variety of barcodes</a>.</li>



<li>The <strong>NewAndroidProject</strong> command can be used with IDE scripting to create an Android project.</li>



<li><strong>MobileApplication.UnhandledException</strong> event now better captures the user runtime call stack for Stack() and StackFrame().</li>



<li>There were many internal changes to the Android framework to get it to have better compatibility with other platforms.</li>



<li>Improvements to <strong>URLConnection</strong> data encoding.</li>



<li>Several <strong>JSONItem</strong> improvements.</li>



<li>The Android compiler toolchain was updated to newer versions.</li>



<li>Added <strong>Dependencies</strong> property to the Android advanced build settings. This can be used with Declares and Libraries to load any external dependencies they need. Put one dependency per line, an example would be: io.github.bitstorm:tinyzip-core:1.0.0</li>



<li>Improved compatibility with <strong>Android 14</strong>.</li>



<li>Many framework and compiler fixes.</li>
</ul>



<h2 class="wp-block-heading">Xojo 2024r1</h2>



<p>The first release of 2024 continued the trend of rapid Android improvements.</p>



<ul class="wp-block-list">
<li>MobileApplication.Activated and Deactivating events now work on Android.</li>



<li>Fixes and improves to several parts of the framework, including:
<ul class="wp-block-list">
<li>Introspection</li>



<li>SQLiteDatabase</li>



<li>JSONItem</li>



<li>URLConnection</li>
</ul>
</li>



<li>Many other framework and compiler fixes.</li>
</ul>



<p>Don&#8217;t forgot to review the <a href="https://documentation.xojo.com/resources/release_notes/2024r1.html">full release notes</a>!</p>



<h2 class="wp-block-heading">Xojo 2024r2</h2>



<p>The latest Xojo release has plenty of improvements for Android. Some highlights include:</p>



<ul class="wp-block-list">
<li>MobileHTMLViewer field focus is now more reliable.</li>



<li>TCPSocket is now available.</li>



<li>Many Graphics properties are now available, including: ShadowBrush, LineCap, LineDash, LineDashOffset, LineJoin, Outline.</li>



<li>Improved some compiler error messages.</li>



<li>Many more framework and compiler fixes.</li>
</ul>



<p>The <a href="https://documentation.xojo.com/resources/release_notes/2024r2.html">full release notes</a> are a fun summertime read.</p>



<h2 class="wp-block-heading">What&#8217;s Next for Android?</h2>



<p>As you all know by now, we don&#8217;t preannounce when things will appear in Xojo releases. We are continually working on adding features and improving Xojo for Android and when new things are ready, they appear in the next scheduled release. The best way to stay on top of what is going to be released soon is to help us with pre-release testing. Remember, if you have an active Xojo Pro license, you have access to a special pre-release section of the forum. If you have a Xojo Mobile license and woudl like to participate in testing please <a href="mailto:hello@xojo.com">make a request</a>.</p>



<p>With that said, some of the Android features in development include:</p>



<ul class="wp-block-list">
<li>ByRef support</li>



<li>RegEx classes</li>



<li>DatabaseConnection</li>



<li>In-app purchasing support</li>
</ul>



<h2 class="wp-block-heading">Related Topics You Might Like</h2>



<p><a href="https://blog.xojo.com/2024/03/26/android-design-extensions-2-5-for-xojo-2024r1">Android Design Extensions 2.5 for Xojo 2024r1</a></p>



<p><a href="https://blog.xojo.com/2023/10/10/android-improvements-in-xojo-2023r3">Android Improvements in Xojo 2023r3</a> </p>



<p><a href="https://blog.xojo.com/2023/08/15/creating-an-android-library-with-kotlin-for-use-with-xojo">Creating an Android Library with Kotlin for Use with Xojo</a> </p>



<p><a href="https://blog.xojo.com/category/cross-platform/android/">All Android related blog posts on the Xojo Blog</a></p>



<p><em>Paul learned to program in BASIC at age 13 and has programmed in more languages than he remembers, with Xojo being an obvious favorite. When not working on Xojo, you can find him talking about retrocomputing at <a href="https://goto10.substack.com" target="_blank" rel="noreferrer noopener">Goto 10</a> and </em>on Mastodon @lefebvre@hachyderm.io.</p>



<ul class="wp-block-social-links has-normal-icon-size is-content-justification-center is-layout-flex wp-container-core-social-links-is-layout-16018d1d wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-facebook  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.facebook.com/goxojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"></path></svg><span class="wp-block-social-link-label screen-reader-text">Facebook</span></a></li>

<li class="wp-social-link wp-social-link-x  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://x.com/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" /></svg><span class="wp-block-social-link-label screen-reader-text">X</span></a></li>

<li class="wp-social-link wp-social-link-linkedin  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.linkedin.com/company/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg><span class="wp-block-social-link-label screen-reader-text">LinkedIn</span></a></li>

<li class="wp-social-link wp-social-link-github  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://github.com/topics/xojo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg><span class="wp-block-social-link-label screen-reader-text">GitHub</span></a></li>

<li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://www.youtube.com/c/XojoInc" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Android Design Extensions 2.5 for Xojo 2024r1 +</title>
		<link>https://blog.xojo.com/2024/03/26/android-design-extensions-2-5-for-xojo-2024r1/</link>
		
		<dc:creator><![CDATA[Martin T.]]></dc:creator>
		<pubDate>Tue, 26 Mar 2024 15:40:00 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Guest Post]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[2024r1]]></category>
		<category><![CDATA[Declares]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Xojo Programming Language]]></category>
		<guid isPermaLink="false">https://blog.xojo.com/?p=12818</guid>

					<description><![CDATA[The first Xojo version in 2024 is ready and so it's time again for an update of the Android Design Extensions, which are now available in version 2.5. This version runs for all Xojo versions from 2024r1 upwards and offers over 70 new declares. The focus of this release was on the integration of pictures in controls, such as MobileButton, MobileDateTimePicker, MobileTextFields, MobileSlider etc.]]></description>
										<content:encoded><![CDATA[
<p>The first Xojo version in 2024 is ready and so it&#8217;s time again for an update of the Android Design Extensions, which are now available in version 2.5. This version runs for all Xojo versions from 2024r1 upwards and offers over 70 new declares.</p>



<p>The focus of this release was on the integration of pictures in controls, such as MobileButton, MobileDateTimePicker, MobileTextFields, MobileSlider etc.</p>



<p>Let&#8217;s take a look at some new possibilities using examples.</p>



<h2 class="wp-block-heading">Create a MobileButton with a Picture</h2>



<p>This is a feature that is in demand in Xojo Issue Tracker and has not yet found its way into the Android framework. So let&#8217;s just do it ourselves with the help of the Android Design Extensions.</p>



<p>Create a new Android project. Now copy the Android Design Extensions folder into the project or drag and drop it into the Navigator. Now select Screen1 in the Navigator and add a MobileButton &#8211; Button1 &#8211; and give it the Opening event. Add the following code to the Opening event: </p>



<pre id="xojo" class="wp-block-code"><code>Me.SetIconXC(SaveSystemImage("camera")) 
Me.SetIconGravityXC(IconGravity.TextStart)</code></pre>



<p><em>SaveSystemImage </em>is an extension method that returns a <em>FolderItem </em>and saves a <em>Picture.SystemImage </em>with the specified name (here „camera“) in the Documents folder. Why? Xojo Declares do not support Picture as a data type and therefore we have to take the detour and save images once in order to load them into controls via the file path.</p>



<p>You can of course also use any other image and are not restricted to Picture.SystemImage. All Android Design Extensions extension methods that have to do with the display of pictures are prepared for this and expect a FolderItem as a parameter, which must of course be a picture (PNG, JPEG etc.).</p>



<p><em>SetIconGravityXC </em>ensures that the Picture is displayed in front of the button text. And that&#8217;s all there is to it. Execute the project and you have a button with an image.</p>



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="1024" height="531" src="https://blog.xojo.com/wp-content/uploads/2024/03/untitled-1024x531.png" alt="" class="wp-image-12821" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/untitled-1024x531.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/03/untitled-300x156.png 300w, https://blog.xojo.com/wp-content/uploads/2024/03/untitled-768x398.png 768w, https://blog.xojo.com/wp-content/uploads/2024/03/untitled.png 1080w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p><strong>Tip: </strong>If you create a MobileButton subclass, you can cache the FolderItem via Static to create the image file only once. Of course, this only applies to the fact that all button instances of this subclass should always display the same image.</p>



<p>To see how to add an image to a MobileScreen, MobileSlider or MobileSwitch, simply take a look at the Android Design Extensions sample app.</p>



<h2 class="wp-block-heading">TabPanel Badge Extension</h2>



<p>MobileTabPanel tabs now also support text badges. How is it done?</p>



<p>Add a MobileTabPanel &#8211; TabPanel1 &#8211; to your project and add the Opening event to it with the following code: </p>



<pre class="wp-block-code"><code>Me.SetBadgeTextAtXC(0, "Exclusive")</code></pre>



<p>And that&#8217;s all there is to it. The result is as follows:</p>



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="1024" height="474" src="https://blog.xojo.com/wp-content/uploads/2024/03/jewlery-1024x474.png" alt="" class="wp-image-12820" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/jewlery-1024x474.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/03/jewlery-300x139.png 300w, https://blog.xojo.com/wp-content/uploads/2024/03/jewlery-768x356.png 768w, https://blog.xojo.com/wp-content/uploads/2024/03/jewlery.png 1080w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>There are other MobileTabPanel extension methods with which you can customize the badges (color, position, etc.). Give it a try!</p>



<h2 class="wp-block-heading">TextFields on a New Level</h2>



<p>TextFields can also be enhanced with the new Android Design Extensions version.</p>



<p>The <em>SetBoxCornerFamilyXC </em>call now offers the option of choosing whether you want rounded or flattened corners. You can also use <em>SetCursorColorXC </em>to define the color of the cursor for each individual TextField.</p>



<p>TextFields can now also have leading or trailing icons. The helper methods for this are <em>SetStartIconXC </em>and <em>SetEndIconXC</em>, which in turn expect a FolderItem (Picture) as a parameter.</p>



<figure class="wp-block-image size-large is-style-default"><img loading="lazy" decoding="async" width="1024" height="289" src="https://blog.xojo.com/wp-content/uploads/2024/03/defaut-text-1024x289.png" alt="" class="wp-image-12819" srcset="https://blog.xojo.com/wp-content/uploads/2024/03/defaut-text-1024x289.png 1024w, https://blog.xojo.com/wp-content/uploads/2024/03/defaut-text-300x85.png 300w, https://blog.xojo.com/wp-content/uploads/2024/03/defaut-text-768x217.png 768w, https://blog.xojo.com/wp-content/uploads/2024/03/defaut-text.png 1080w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>There are many other new declares. Have a look here too.</p>



<p>Feel free to take a look at the developer repository, create feature requests, and provide feedback on extending this extension library.</p>



<p>I’m happy to receive any voluntary financial support for the work I’ve done so far, which you are welcome to <a href="https://www.paypal.com/paypalme/MTrippensee">share</a> here. You can download the project with many examples <a href="https://github.com/XojoGermany/AndroidDesignExtensions">here</a>.</p>



<p>Happy Coding.</p>



<p><em>Martin T. is a Xojo MVP and has been very involved in testing Android support.</em></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
