Web, native or cross-platform?

So you’ve come up with a concept for an app or you have a service which in your mind would benefit greatly to be “appified “and given to the end user, but what tech do you choose to use? A web page? Hybrid web app? Native apps? Or do you go cross-platform?

At Shortcut we’re blessed with lots of highly skilled native developers for both iOS and Android, and we believe that native is the way to bring forth the best experience for the end user. There’s really no arguing it considering the platforms are designed this way.

Since the launch of iOS and the app store we’ve had a steady increase of alternative solutions that allow you to create apps that work on multiple platforms. The motivation behind these solutions is to leverage the knowledge you already have. It might be a particular language or a whole ecosystem that would be foolish to leave behind to go and learn Swift and Kotlin (or would it?). One other motivation is to be able to share code, assets and other resources, because why do the same work two to three times over?

Having worked with web, hybrid, native and cross-platform apps I can recommend these four ways of achieving your goal:

  • Web page
  • Native app using Objective-C/Swift for iOS, Java/Kotlin for Android and C# for Windows 10
  • React Native (Javascript)
  • Xamarin (C#/F#/VB.NET)

If you’re a web developer reading this you might ask me why I left out hybrid apps (or progressive web apps). Hybrid apps offer the user experience of a web page but is presented like an app. Very confusing. It can work, but experience has shown me and others (look up Facebook) that it’s not really to be recommended. However, that’s why I’ve included React Native.

Before we proceed lets get a little bit more familiar with React Native and Xamarin which represents the cross-platform choices I’m comfortable recommending:

React Native is a framework that allows you as a developer to leverage your experience and knowledge of Javascript and React for building native mobile apps. React Native is available for iOS and Android with Windows 10 support being currently developed. You define your UI the same way as you normally would when creating a web-page with React. The difference being there’s no browser or HTML involved. You use components such as Image, View, Text, ListView etc which are native UI elements that are represented as React components. It’s quite neat. It also aims to provide a common set of components to easily create apps that span multiple platforms such as iOS, Android and Windows.

Xamarin is a platform for creating native apps using C#, F# or Visual Basic .NET and leverages the power of the .NET framework. Xamarin gives you access to the whole API surface of iOS and Android and applies some .NET bits to it where possible. If you have experience with iOS and Android you will be quite familiar using Xamarin, because it’s the same components, classes, storyboards and XML layouts that you’re used to. Xamarin also provides a UI abstraction layer with their Xamarin.Forms framework you can use for writing layouts once in C# or XAML that works on iOS, Android and Windows. It works the same way as React Native where you have common components such as Buttons, Images that translates to UIButton for iOS and Button for Android and Windows behind the scenes.

“Okay Henning, enough talk, I’m on a tight schedule, just give me the answer so I can tell my managers what we’re gonna use for our app and be done with it”

I wish it were that simple. The trick to choosing the right one is challenging your idea, churn the user experience and don’t fixate on any one solution early on in the process. I highly recommend bringing in designers and developers that have experience with developing mobile apps. Especially if you’re thinking of hiring an app agency. The team will work with you on the idea and advise you on what will be the most beneficial for what you are trying to achieve.

When working through the app there are a couple of things to consider and determine early on which will help you decide:

What is the goal of the app? What’s the main feature going to be and who is it for? Under what conditions will the users be using this app? In some cases some ideas are better portrayed as a web page than an app. Challenging the idea early on will help you better determine this.

Do you want a full app or a prototype? When being agile (LEAN) it is highly recommended to test your concept early on with real users. Is the prototype going to be on iOS, Android and/or Windows? Cross-platform tools like React Native and Xamarin.Forms can get you quickly up and running with working prototypes reducing the workload needed to develop and maintain multiple platforms.

Who’s going to be doing the actual development? What are the strengths of the team? Don’t be clouded by your IT department or higher ups. It might sound nice that you want a web solution (or some other specific solution) since you can maintain it yourself when the app is done. Don’t fool yourself. If you’re serious about the app it will never be “done” and it is highly likely you won’t have the resources to push on through yourself.

The most important thing when choosing a framework is to not let your decision impact the user experience. You’ll most certainly want the users to have a great experience. It will be beneficial to you and your company.

I’d love to talk more about this with you so please do feel free to comment, contact me on my e-mail or tweet me @henningmosand.

If you’re serious about developing great user experiences then take a look at www.shortcut.no — we’ll be happy to talk and work with you.

Try Android apps on your Windows Phone today

At Microsofts yearly developer conference, Build this April; they announced two interesting projects or bridges as they call them: Project Astoria and Project Islandwood. These bridges are intended for getting apps created for other platforms, namely Android and iOS to run on Windows 10.

Project Astoria contains a whole Android sub-system and will in its first rendition only be available on Windows 10 Mobile; which means phones and phablets only. Sorry desktop users.

In the latest builds of Windows 10 Mobile released through the Insider Preview Program the Android sub-system has been reportedly been a part of that package. Many pictures of developers and enthusiasts analyzing files and namespace have circulated on Twitter, and earlier today tools and documentation leaked for Project Astoria; making it so that some of us with supported phones can sideload Android apps onto our device.

Project Astoria currently works on a small set of phones, but it has been theorized that the next build of W10M will open up for a lot more devices. The current list of supported phones:

  • Nokia Lumia 920
  • Nokia Lumia 925
  • Nokia Lumia 929 / Verizon Icon
  • Nokia Lumia 830
  • Nokia Lumia 930
  • Nokia Lumia 1520
  • Nokia Lumia 635 (1GB RAM variant)
  • Nokia Lumia 730
  • Nokia Lumia 820
  • Nokia Lumia 435
  • Nokia Lumia 928

Unfortunately the new Lumia 640 and 640 XL aren’t supported which happens to be phones I have access to here while travelling so I have no way of testing, verifiyng or uploading a video to show of the features. I will make a video in a few days when I’m back home so be sure to check back for more detailed information.

In case you have a supported phone and want to test it out, you can head on to Neowin and check out their installation process, but beware, it can end up badly (well, hard reset badly) for the phone.

Xamarin Android: You are trying to install this package into a project that targets ‘MonoAndroid,Version=v2.2’

Today I created a new Xamarin Android project, and I wanted to test out Material Design on my phone (still runs 4.4.2) using the revamped AppCompat v4 library. To my disappointment I was unable to install the AppCompat NuGet package:

Turns out this can be a common problem when using Visual Studio and the “Compile using Android version” is not explicitly set. The default in my case is “Use Latest Platform”. What this does is making VS to add the proper TargetFrameworkVersion property in the .csproj file. It seems that sometimes this does not get set at all when creating a project and “Use Latest Platform” is set. Weird. In any case, setting this explicitly fixes things and NuGet understands which version of MonoAndroid to use. The default is 2.2, but we want something newer, preferably Android Version 5.

So change this:

01-compile-using-latest

To this:

02-compile-with-21

Reload the project when asked by Visual Studio and install the package again!

Thanks to the awesome community over at the Xamarin Forums for being on top of this already — check out the post here.

UPDATE: Haha, never mind the blurred out assembly name in the first image. Don’t know why I did that 😉

Skype Qik Impressions

Skype announced earlier today a new app: Skype Qik (pronounced Quick I guess), a video messaging app which bears similarity to apps like Snapchat and Facebook Messenger.

skype-announced-qikThe tagline is “The new mobile messenger for swapping videos with groups of friends”, and that is exactly what and all it does. In Skype Qik you have the ability to send videos to a person or groups of people at the same time. Nothing more, nothing less. How does it fare? Find out after the break

OneDrive ups its value; 15GB free for everyone, 1TB for Office365 subscribers

Microsoft announced earlier today that they are increasing the storage plans for everyone using OneDrive and lowering the cost of the storage plans of up to 70 %. That means for users of OneDrive they will be upgraded in the coming months to 15GB storage, a little more than doubling your storage space previously. This is for the regular free version, and  if you have paid for more space then you will continue to get that but at lower rates.

The OneDrive team reports that the monthly pricing of their storage plans have dropped, and is now priced the same as Google Drive, at $1.99 per month for 100GB of extra storage, and $3.99 per month for 200GB. This is great news for users. With prices equal to Google Drive and both having lower rates than Dropbox ($9.99 per month for 100GB), it’s a competition on who can deliver the best service for the same price.

This is not the only announcement they made today. Office365 subscribers will soon get 1TB of storage per subscription. For Office365 Home users ($9.99 a month) that means 1TB per person (up to 5 people). That is quite interesting, as the Office365 subscription includes access to the Office Suite and other perks as well, and for the prices ranging from $6.99 per month up to $9.99 per month (or $74.99 for 4 years in the University package) that is great value you’re getting.

If I were you, then I would certainly go for the Office365 subscriptions and get access to the Office suite which now is available on Windows, OS X, iOS, Windows Phone and Android, as well as 1TB of online storage.

Source: https://blog.onedrive.com/new-onedrive-storage-plans/

Finding the distance between two points using Android MapView

In developing an application that is soon to be released in the Norwegian marketplace I’ve been struggling a bit with finding the distance between two points so I can use the MapController’s zoomToSpan method that zooms to fit a given span/region.

The solution that was presented to me was using Location.distanceBetween(latA, lonA, latB, lonB); but little did I know that I would spend hours of tracking down why this method wouldn’t work for me.

The solution? We already know (at least by now) that when you’re given coordinates in the form of “Lat: 51.45999, Lon: 10.344” you need to extract those values and multiply it by 1E6 (10^6) to get a valid GeoPoint in micro-degrees. The problem I was having was that I passed on to Location.distanceBetween those values instead of the original values which caused some head-scratching moments and lots of frustration.

In order to use Location.distanceBetween(); correctly I had to divide my GeoPoint locations by 1E6 in order to get a valid calculation.

So if you’re struggling with distanceBetween and zoomToSpan make sure you’re working with valid data!

Removing or editing the pressed err.. highlight color of ClickableSpan in Android

I’ve been struggling for some hours with TextView and Spannable.. ClickableSpan to be precise. It seems that when you tap the clickable text it gets an ugly orange stroke (might differ on devices) around the text and if you so happen to have this in a custom view as an item in e.g Gallery it really stands out by highlighting it everytime you scroll away from that view. Annoying, yes?

The solution is extremely simple and was provided by a thread over at Stackoverflow.com.

To edit or remove the higlight color you can simply set the TextViews highlight color itself to any color you want or Color.TRANSPARENT if you don’t want any color.

or in code

So there you go!