Cross Development Fun

In the last post I mentioned development using Visual Studio 2017 for developing a new app for Android, Windows and iOS. The Android app was released in late October and the Windows 10 version a week ago. For now the iOS version is on hold until next year. I still have to buy a Mac. The game using SDL2 is also on hold until funding is forthcoming.

This was my first experience with the Windows Store. I found it a much more mature experience than Google Play which has some things missing. For one, I was able to offer the Windows 10 app, which runs on both desktop and mobile with a 7 day free trial which currently is not possible on Google Play. Microsoft has 1, 7, 15 and 30 day free trial options. So unlike Android where I created some minimally functioning demo versions the trial version suffices.

I was also able to test the app with a Windows 10 8” tablet, the Digiland DL808W, which I picked up for less than $50 at Fry’s. Everything functioned perfectly on this little tablet except for Bing Maps. Looking at the debug monitor even when running on my Windows 10 PC, maps takes up a lot of memory so the 1 GB memory was not enough. Keep in mind that Google Maps will run on Android devices with only 512 MB of memory. Obviously Microsoft needs to do some optimization.

One thing about the Windows Store is that Microsoft signs the app so small developers don’t need to purchase a code signing certificate which can be very daunting. But since they sign the app they apparently want to check out every update so those don’t go up as quickly as they do on Google Play so I will stage update farther apart.

The app on Windows Store:

BTW, if you tried accessing this site recently it probably didn’t come up. My web hosting company somehow messed up the DNS. As soon as I noticed they remedied it quickly after I called.

Going Universal

Continuing on the Universal Windows Platform track, last fall I started working with Xamarin Forms in Microsoft’s Visual Studio. I had done several apps using .NET and Microsoft Forms but Xamarin offered a way to create one app using the UWP (Universal Windows Platform) to create an app for Android, Windows and iOS.

I’ve had a number of requests for iOS apps over the years but I shied away from doing them because 1) I didn’t own a Mac and 2) nor did I want to invest time in learning Objective C which has little use outside of Apple products. UWP offered a way to do this.

I wasn’t all that foreign to Xamarin cross development having done apps using Mono on Linux and compiling them for Windows using Xamarin. With Visual Studio Community being available first when I did an app for Unity 3D and then available for other development I jumped in.

Initially it was for a much requested version for 7” tablets of my popular Indian astrology app. I had a landscape layout for 10” tablets but people wanted that on a their 7”. The problem is that the layout that worked for 10” tablets would be difficult to navigate sized down to 7”.

Hence I used Xamarin to create a new tablet layout. This grew into a new version for phones as well as tablets. These are going to be two separate “pro” versions with the extra features that people have requested that would be difficult to add to existing versions.

Another thing about “forms” is they are much easier to work with than the Android development environment. As other developers have noted it’s often difficult when spending some time away from Android development to remember how it all works. Not so if time is spent away from Xamarin. It’s all very straight forward with a lot of options.

There are, of course, some things missing that I need. One was popup dialogs that could used more than just text. Turns out there was an XLabs popup module that could handle that. And on the other hand was something available missing on Android: Formatted Text. On Android many of my text was all just drawn as a graphic and a bit of a pain to program. Formatted Text is much more like using HTML where I could change color and text attributes programmatically.

Also I have the ability to just change the Xaml layouts to get a portrait phone and tablet landscape version from the same code. However my experience with Android users is these are best offered as separate apps. There have been tablet users who wanted the portrait phone layout on their 10” tablet. Now this will be possible.

Next up will be an article on my experience of using Visual Studio 2017 to port an SDL2 C++ developed game to Android. I hope to offer some example source too for some of the underdocumented or tricky things to do with these environments.