Adopting Android

Since 2016 we’ve been reviving our mobile applications for Oneflare, bringing back the Android and iOS apps with new versions built from the ground up. Our aim was to provide businesses with faster job leads from push notifications and to give them a native quoting experience on mobile devices.

Having relatively little experience with developing for Android myself, creating and scaling mobile applications was rather foreign. I’d like to share some lesser known insights, especially after originally working on browser based platforms.

I’m New To This – Learning Mobile Development

Here are some great technical resources if you’re just starting out; CodePath, The Big Nerd Ranch: Android Programming Guide, the Android Development subreddit and this Github repository by Mindorks. CodePath includes up to date tutorials for Android and the Android subreddit has great discussions on everything from experimenting with tools to upcoming news within the community.

A big part of mobile development is getting having to write both ‘frontend’ and ‘backend’ code as well as getting familiar with design. Some good resources for design would be Google’s Material Design for Google’s recommended guidelines, Android Niceties, Material Up and Dribble for patterns and inspiration. Also when building designs, you’ll need to decide on which pixel density and screen resolution you’ll be targeting. A good tip is to design in 1x size which makes it easier to manage.

Conventions & Patterns

It can be difficult to decide on how you should build out your app due to the amount of options and the forever changing nature of Android. You could go with a project that has one ‘God’ activity and many fragments, have individual activities for each page or scrap fragments all together and go for custom/compound views. You could also have different presentation layer architectures such as MVP, MVC or MVVM. Luckily Google is helping out with Architecture Components as well as showcasing example projects on Github to give some guidance.

At the end of the day don’t be afraid to just start. You’ll learn a lot on the way and can figure out what works best for your team and how you can scale/test your projects better.

Back End Woes

Once the new mobile apps were built, we ran into a few problems we initially glossed over, such as:

  • Deprecating outdated versions. We solved this by versioning our webservice to only allow new app versions to send requests. The apps would also receive back a minimum version to display an upgrade dialog to the user.
  • Building our webservices in a way that would scale and not require future app updates. This really shifted the way we thought about design and if possible, build endpoints in a dynamic fashion. A lot less hardcoding and storing assets/links on the apps.
  • Limiting requests and caching data to save battery and provide more usability while offline or experiencing bad latency. Debugging using XCode’s Network Link Conditioner helps.

Get Fragged by Fragmentation

You may encounter irregularities between certain devices and operating systems throughout your development cycle or while monitoring production. Having a few different test devices helps tremendously (at least one Samsung device!). There’s also a decent amount of users still on older versions of Android, so you may need to have feature flags for old devices or provide different APKs for different API versions.

Some of our headaches included:

  • Utilising the camera API for different devices.
  • Handling transitions and animations for older versions.
  • Handling notifications for different android versions.
  • Finding odd crashes/layout problems pertaining to the view.

Despite the challenges, we’ve noticed that investing in Android has resulted in huge uptake from our businesses and regular uses. They stick around for frequent updates that help us achieve our business goals of making it easier for businesses to win more work and users appreciate it when the time has been invested. Expect more posts in future where I’ll go into detail about some of these problems and future tutorials.

Android Developer @ Oneflare

Leave a reply:

Your email address will not be published.

Site Footer