Categories
mobile Programming

Android: Testing an Intent Service

There’s a handy thing in Espresso called the ServiceTestRule, which is for testing Services. Yay. I thought it was just what I needed until I read this bit of the documentation… OK, first up – refactoring my IntentService. This class already did very little, poking something else depending on the kind of Intent it received, and […]

Categories
Programming

Testing Intents on Android: Like Stabbing Yourself in the Eye With A Blunt Implement

The picture above shows what am I testing: the home screen of my app. There is a camera button, a gallery button and an inspire button. All of these launch intents, but the camera and gallery buttons launch intents that are expected to return something – an image – either from the camera or the […]

Categories
mobile Programming

Android: Touch to Change Image

On iOS I do this using a button (with different pressed state), and I figured it would be the same on Android, but turns out, no. Step 1: Add a second image to the XML, and set the visibility to “gone”. <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/processed_image_background"> <ImageView android:id="@+id/processed_image" android:layout_width="match_parent" android:layout_height="match_parent" android:scaleType="fitCenter" /> <ImageView […]

Categories
mobile Programming

Further Adventures in Android Development

I suspect one of my limitations as a programmer is that I don’t hack. I don’t beat away at something until it works. I read things, and I reason about it, and I write a lot of tests. This makes me very effective on platforms I’m familiar with, but I worry I’m as a result […]

Categories
mobile Programming

Creating and Comparing Images on Android

A while ago, I wrote this blog post on creating and comparing UIImages. That code allowed me to develop the image processing part of the app against my unit tests, which was really, really helpful given that I rewrote it about four times to make it performant enough. So, when I started writing Android code […]

Categories
mobile Programming

Cross-Platform Development Decisions

I’ve started to port Show and Hide to Android. There’s still a lot to do, but I hit a milestone of having it working end to end on the emulator last week, which was exciting. One of my friends asked if I was using any libraries to make it easier, and the short answer is no. But […]

Categories
mobile Presentation

iOSDevUK: Kenton Price: Teaching Your Client Android Design or Don’t be an iPhoney

The problem: Android devs generally given designs for iPhone. “But that’s just like Android, right?” Rid the world of these iPhoney apps now. Used to be like windows apps on Apple. People still do iOS first, Android is an afterthought. Android users want Android apps. Android users can tell when it’s an iPhone port. Android […]

Categories
Programming

My Inspiration App: App Concept

My app idea – a place to collect things that inspire, that can be found searching their tags, location, or type. I understand that people can and do use any number of other apps for this – Twitter favourites, for example, this is just supposed to be a purely happy and motivating place on our […]

Categories
Programming

Getting Set Up on Android

I used the event Programming Languages I’ve Been Meaning To Try But Haven’t Gotten Around To Yet at the Stripe offices (organised by Star Simpson) in San Francisco to get going on Android. Aside – I love the concept of this event. Great opportunity to hang out with your laptop, the only goal being to suck […]

Categories
Education Programming

Getting Started With App Inventor

A colleague and I are running a workshop for high school teachers this week, and we plan to use App Inventor (which will now live at the MIT Media lab). So I had a play around with app inventor and it is so easy to get started. The beginner app is one where the kitty purrs […]