Wednesday, October 18, 2017

Xamarin and iOS11


It’s that time of year. Each year the fall season brings a winding down of summer fun, changing of the leaves, football and a new version of Apple’s iOS. The fall of 2017 is no different. My college football team lost the first weekend -- on national TV -- and Apple has delivered iOS 11.

iOS 11 is the latest version of Apple’s mobile app OS. It has a lot of new APIs and UI changes and comes loaded on the most recent iPhones (iPhone 8 models and the new iPhone X). iOS 11 comes with a new set of APIs that developers will care about. 

Wednesday, October 11, 2017

Xamarin.Forms Updates - September/October 2017

I've got a new article out on Xamarin.Forms.  It is a look at some of the features that just came out as well as some features coming out in the next major release (3.0).  The 3.0 release is stated as being out in the 4th quarter, 2017, but we will see.  I never trust shipment dates.  :-)

Note: Xamarin called the next update version 2.3.5 at the time the article was written.  The version was changed to 2.4 right before the article was published and we didn't know until it was too late.

Url: https://visualstudiomagazine.com/articles/2017/09/01/xamarinforms-updates.aspx

I have an interesting relationship with Xamarin.Forms (XF). My view of cross-platform interfaces was born back in 1993 during a hallway conversation regarding cross-platform (Windows and Mac at the time) and how an interface that looked like Windows on the Mac meant the Mac users were going to come for you with pitchforks.

I had several conversations from 2011 to 2013 with various people from Xamarin about the need for a cross-platform visual UI for mobile devices. Basically, I was hearing from customers that there was a need for a cross-platform UI API. There needed to be some type of API that developers could call for buttons, textboxes and lists that spanned iOS and Android platforms. My favorite response was: "When hell freezes over." I laughed about this because I hate cross-platform APIs that don’t look like the underlying platform. I’ve seen this several times with cross-platform UIs.

Then I was in Las Vegas in 2013 and my friend told me that "Hell has indeed frozen over." I laughed because I knew exactly what he was talking about. A few weeks later I was in San Francisco and had about three hours of discussion with Jason Smith -- the mastermind behind XF who comes from the gaming industry where performance is key -- regarding XF, how it would work, some of the underlying pieces and a bunch of things that were well over my head.

Fast forward almost four years, and I’ve seen some highs and lows with XF. It works well for things that are fairly simple. For apps that are complex, I’ve been less sold on the idea. Having to load a lot of external components to get the native device functionality into a project isn’t a formula for success, I found. I’ve been bitten by components no longer supported, components not working as advertised and my general distrust for components not part of a main product package. Add with the experience of XF running fine on iOS and horribly slow on anything but the most recent Android devices, I’d become quite concerned about the feasibility of XF. I’ve been concerned about the amount of dependence on XF as the singular cross-platform development solution with Xamarin. Thankfully, over the past year I’ve doubled down on my testing of XF. I’ve written two applications for my startup and used XF. Each application has been thoroughly tested on my 2-year-old Android phone. These apps seem to run well, but they’re admittedly simple and might not be a good example measurement. After all, both deal more with data, pictures and Web services than they do with a lot of UI interaction.

Enjoy, and thanks for reading.

Friday, August 11, 2017

A Filtered View of Core Image


While professional photographers don’t like them, the simple fact is that the camera from practically every iteration of the iPhone has been comparable to what was available in prosumer DSLR cameras. The camera can be used to take pictures (duh), as well as to focus quickly (which is good for barcodes and QR codes). One of the great features of iOS is that it has the ability to take a picture and perform an operation on it, such as run a filter or perform facial detection. This is provided by the iOS Core Image Library.

Filters can be used for creating various effects on images. You might be thinking, "So what? I’ve been able to do that for quite some time with Instagram." Filters are just one part, but Core Image also can detect faces. With the automatic ability to detect faces in images, these images can be easily cut down to get facial information.
In this article, I’ll look at how to apply filters to images and to detect faces.

Monday, July 24, 2017

Our Journey Through Creating Documents and Into Aspose Words

Over the years, I’ve used various components to create Microsoft Office Documents.  They worked, but I always felt weird about using a component to create something that should come from Microsoft.  There never was anything directly from Microsoft.

I have been running a startup and we need to create documents so that a certain set of customers can print things.  It is not a huge need, but it is something that is ultimately very important to these few.  Out startup is in the golf area.  We need to be able to print cart signs to go on the carts as well as alphabetized lists of the golfers in a couple of formats.  A secondary item was to be able to display QR Codes so that we could get the players started in our application a bit quicker.  To go along with this, we need to talk about our service platform.  Our service runs in Azure as several WebApps.  It is great because we don’t have to manage any servers.  No worries about some update hitting the servers, no worry about the updates, no worry about much of anything.

My first thought was to do my old trick of designing the document, displaying data on a web page, and sending the appropriate mime type for MS-Word.  I wrote this and it is working today, but I ran into a problem.  This solution is great for just printing some documents and not worrying too much about formatting.  I was manually modifying the resulting word documents too much, and it was not something I could expect a user to handle.  Unfortunately, we need some more control in the formatting than I could figure out what to do.  The new mime type solution was a clear no go.

The next option was to try the Open XML SDK from Microsoft.  I downloaded the SDK, and it seemed to have a lot of documentation, so I thought it would be the right selection.  I thought, “Hey this is from Microsoft, so it will do what I need. Because it is from Msft, a junior level guy will be able to handle this.”  After about a week of this, it wasn’t happening at all.  There were all kinds of little issues we were causing things to not work.  The nuget packages created problems.  He was pulling his hair out.  This just wasn’t working.  I started to look at options.


I “talked” to some of my friends of mine over email, if that is really talking.  There were several components mentioned, and about 40% of the response were Asposes family of components.  We downloaded the nuget packages.  In 3 days, my entry level developer had all of the options I needed working.  He had items in the right spot.  Everything was working.  A couple of more days, and had had things formatted.  We were testing the formatting in ways that we couldn’t do before.  The signs were coming out correctly.  We create team lists, and that was working properly.  He had done all of this quickly and easily using Aspose Words component.  

One of my next steps was to create a QR Code document, that we could use to allow teams to scan the QR Code so that a team could immediately begin using our app with no login hassles and no need for their cell phone number.  The team downloads our app from the Apple/Android app store, scans the QR Code that they get from their golf cart, and the app immediately loads using their web browser.

Aspose Words definitely worked and made our lives easier.

Wednesday, June 21, 2017

Track Your Fitness & Steps On Your iPhone, Just Like Your Fitbit

I’ve been a Fitbit user for several years. I enjoy using it, reading the material and hoping that if I push myself it will help my level of fitness (probably not). What I don’t like is that:
  • It’s another device that I have to keep track of. Sure, it's on my wrist, but I still have to maintain it.
  • I have to keep it charged. My current daily driver is a Fitbit Charge2 that holds a charge for seven days – that's great, but it still has to be charged. So, I also have to keep track of a charger, which adds to the hassle.
Those two things aside, I've found that the device's usefulness far outweighs the hassles. I've even developed a pedometer app for it, which I'll show in this column.
The app uses the CoreMotion iOS framework, which is used for determining number of steps walked/run.

Wednesday, June 7, 2017

More For Your Charity Golf Tournament

Do you run a Charity Golf Tournament? Are you tired of waiting for the last group to come in to start tallying scores? Are you tired of chasing down the scorecards in the parking lot from people that want to leave? Would you like to know how things are going while you are playing on the course? Would you like to make a few more dollars in sponsorship money? Do you want to provide a better experience for your golfers?

I would like to invite you to check our product named "AutoCard" and our company "Tournament Director, LLC." I have written an internally developed application to allow for real time scoring of charity golf tournaments, as well as other type of golf events. We ran this in a private beta with a couple of regular golf groups in 2015, opened it up to a few charity events in 2016, and are now trying to get out to provide this service to more events in 2017.

Some of the events that we have done already:
2016 UT Hospital TeeUp For Trauma.
2016 Children's Hospital Golf Classic with Peyton Manning.
2016 Smoky Mountain Boys & Girls Club.
2017 UT Hospital TeeUp For Trauma.
2017 Phil Fulmer Celebrity Golf Classic

If you are planning a charity golf tournament, please contact me. I can answer your questions, discuss costs, and help you improve your event.

Video about our product: https://www.youtube.com/watch?v=LhMFaC-is04

Thursday, March 23, 2017

Cache Images and Handle a Byte Array in the Xamarin Forms ListView

Article Url: https://visualstudiomagazine.com/articles/2017/03/01/xamarinforms-ios-android-mobile-visual-studio.aspx

I’ve always been concerned when working with images. I'm always careful with how my applications use them, as images can be relatively large and apps will typically download them via a cellular or slow Wi-Fi connection. So you might not be so concerned with image size when it takes only a few hundred milliseconds to download, but those milliseconds can add up when your app is trying to download a large number of them.

In a number of previous columns, I’ve focused on how to make a Xamarin Forms (XF) application look and act more like a native application. I'll continue along and this time I’ll look at how you can use the Xamarin.Forms ListView to cache images so that you can use the images in other locations in your application with application performance in mind.

Xamarin.Forms ListView is the equivalent of the UITableView in iOS and the ListView in Android. It allows you to present a simple grid of data to the user. The user is able to easily scroll through the data, and binding textual data to it is also a snap.

One of the problems that I see with XF ListView is that there has only been one way to easily bind the image in an ImageCell in a ListView, and that's by passing the URL of the image to the cell. ListView is then responsible for downloading the contents of the URL, handling the contents of the download, formatting the image contents and displaying the image.

The problem is that I would like to download the bytes of an image once, to a cache, and then have the cached bytes available whenever the application needs them. For example, the golf application I've been developing along with this article series displays a list of team pictures. I would like it to be able to touch the cell, have another screen open and display the image without going to the server to get it. To do this, I need to be able to cache the images. Because the application will cache the image content as a byte array, the application will need to convert from a byte array to an image, so there will need to be a Xamarin.Forms image converter to handle the binding.

I hope you enjoy the article.

Monday, March 6, 2017

Intellectual Property and Your Startup


Now that you've gotten deep into thinking about your startup, it's time to think about the meaning of intellectual property. So, what is it and why is it important to define it in the context of your startup?

You're familiar with personal property as well as business property. Personal and business property – those are fairly tangible items. It encompasses things like the desks, chairs, the computer equipment, the office lease. But your startup is riding on the code you – and maybe a team of other developers or people you might contract out for hire -- create and it's not as tangible.

So, have you given any thought to what encompasses your startup's Intellectual property, or IP? I bet it wasn't the first thing that came to mind when you started thinking about a startup or even when you were in the middle of doing the work necessary to get your startup off the ground. But guess what? It's incredibly important because, as you'll soon realize, your IP is the foundation of your startup. Let's look at the basics of IP, what make up the various types of items in an IP, what's their value, and what you should be doing to protect them.

Thursday, February 9, 2017

Device Specific UIs with Xamarin Forms - Part III

Url: https://visualstudiomagazine.com/articles/2017/02/01/customizing-a-xamarin-forms-app.aspx
 
Last time, I looked at customizing Xamarin Forms applications so that the functionality is the same across platforms. I looked at the components and setting to make this possible, and added some custom, platform-specific programming to accomplish this. The result has been that my picture-taking application for my startup has rounded into form and is usable in low- and high-bandwidth areas. I've had a couple of users test it out with much success.
But that app is still missing something: On the iPhone, XF is well integrated with it. The programming model feels very much like programming against the native iPhone API. On Android, it provides a good representation of the Android UI. However, there are some basic settings in that UI that I feel it's missing.