Trifork Blog

Category ‘Android’

RUNNING CUSTOM “LINT” CHECKS ON YOUR ANDROID BUILDS

April 13th, 2015 by
(http://blog.trifork.com/2015/04/13/running-custom-lint-checks-on-your-android-builds/)

In this post, I’ll share a very simple tip on how to add very simple custom checks of your Android source code to your Jenkins build server, but the tip should be very easily ported to other build servers too.

What?
Most developers know of Lint checks as something which perform some kind of static analysis of their code and which complain heavily about stuff if you are enabling this check for the first time on an old project. Unfortunately, chances are rather high that you choose to disable the check due to time constraints not allowing you to fix all issues right now. Or maybe you actually enable running the checks as part of your build but choose not to make lint errors break it. Those two solutions are equally bad since none of them prevent you from adding bad code to the codebase.

Why?
I won’t go to great lengths to explain why you should perform lint checks, but I’ll say that there are many, many simple checks which can be checked at compile-time and which you (or your colleagues) might not have noticed when implementing a given feature. And why not let the lint tool weed out the stupid errors since it is so much better at detecting these things than you? For example, lint checks can prevent you from publishing an app which crashes on some devices due to code calling APIs, which are not available on devices with too low versions of Android running on them. Lint will compare the minimum API version supported by your app and the API version of every call performed in your app so you can ensure that you have carefully guarded these calls correctly and therefore won’t crash your app at run-time.

Read the rest of this entry »

Basic Android UI performance

February 23rd, 2015 by
(http://blog.trifork.com/2015/02/23/basic-android-ui-performance/)

The base of every good app is performance. No user is willing to use an app with subpar performance, especially not with the amount of apps on the Play Store and thereby possible alternatives. In this post, we will take a look at some of the basics of Android UI performance and some of the pitfalls.

Layout Hierarchies

All Android UI are based on XML files describing the desired design. Developers are easily carried away by nesting several instances of different elements like <LinearLayout> or <RelativeLayout> to solve a layout puzzle. This can be a potential performance problem, since each elements require initialization, layout and drawing. We are talking milliseconds here, but with several layouts on-screen using, for example a <ListView>, these milliseconds get multiplied and noticeable delay could occur. Read the rest of this entry »

Linking apps together with App Links

June 3rd, 2014 by
(http://blog.trifork.com/2014/06/03/linking-apps-together-with-app-links/)

When developing apps for mobile phones you want to offer your users the best user experience. Sometimes this includes showing information outside of your app, in another app. Up until recently, there was no real good way to do this. Luckily, now there is a new initiative App Links that provides an open source and cross-platform solution for app-to-app linking. The initiative is supported by many mobile app developers, like Dropbox, Facebook, Spotify and Pinterest. In this post I will show you an example how to link between two Android applications using the open source implementation for Android Bolts. However, the same principles apply when you want to link between two iOS applications.

Read the rest of this entry »

Apportable (a much better alternative to Phonegap) and AFNetworking 2.0

October 22nd, 2013 by
(http://blog.trifork.com/2013/10/22/apportable-a-much-better-alternative-to-phonegap-and-afnetworking-2-0/)

cocoahead_sm2On October 16th I attended CocoaHeads, an iOS developer meetup that is organized every few months by Peter Robinett of Bubble Foundry and other volunteers. Every time it’s hosted at a different location. It was previously hosted at Spil Games, Xebia and NOS. This time it was hosted at eBuddy. The formula is simple: great speakers show up and talk about interesting frameworks, hacks, tricks and so on. During the presentations, attendees can enjoy some free drinks and food.

This was the fourth time I went and it was the best edition yet! That’s why I decided to blog about it this time. I believe this was the best edition because there were talks given by two speakers from San Fransisco: Matt Thompson and Zac Bowling and they talked about some pretty interesting and even mind blowing topics.

Read the rest of this entry »

Developing apps for the Pebble smart watch

June 18th, 2013 by
(http://blog.trifork.com/2013/06/18/developing-apps-for-the-pebble-smart-watch/)

Pebble

In this blog I want to talk about Pebble. A watch that can connect to your smart phone (both iPhone and Android) via Bluetooth to do all sorts of cool stuff a regular watch can’t do. Among the cool things you can do with it is install apps, which you can write yourself. As a geek and iPhone owner, I find this possibility especially interesting! I want to give an impression of what Pebble is, what it can do and how you can get started developing apps for this watch!

Read the rest of this entry »

Free GOTO Night – Calabash & Agile – March 12

February 23rd, 2012 by
(http://blog.trifork.com/2012/02/23/free-goto-night-calabash-agile-march-12/)

We are organizing another free GOTO Night on behalf of the GOTO Amsterdam 2012 conference. The date is March 12 and it starts at 19.00 at Pakhuis de Zwijger. This time we have two very interesting talks:

“Introducing Calabash” by Karl Krukow and “Agile Talk” by Michael Franken

Please sign up here (as seating is limited)

 

 

Using Android Preferences in a background service

August 12th, 2011 by
(http://blog.trifork.com/2011/08/12/using-android-preferences-in-a-background-service/)

In this post I will explain how I have used the Android Preferences in a background service. The preference is used as an interval for updating a listview with some simple text items.
Read the rest of this entry »

Android basics – Applying some UI patterns

May 6th, 2011 by
(http://blog.trifork.com/2011/05/06/android-basics-applying-some-ui-patterns/)

When I started with my Android application, I had the idea to create a home screen and an action bar just like one of the Android developers described in a blog item. I was really helped by the source code of the Google I/O Schedule app. In this post I will explain how I used several layouts to create my app.

Read the rest of this entry »

Creating an Android app with Google App Inventor

October 27th, 2010 by
(http://blog.trifork.com/2010/10/27/creating-an-android-app-with-google-app-inventor/)

After a few times filling in the registration form and weeks from waiting, I finally got an invite for Google App Inventor. In this post I will explain how I have tried to rebuild an app that I created before with “normal” programming.

Read the rest of this entry »