Consuming a JSON REST API in Android

JSON REST API

This week’s blog post was requested by one of our readers, Jasmine.

Jasmine asked if I could write a guide on “processing JSON data for android applications using NodeJS and Express and Android Studio”.

I haven’t done anything using Android Studio in a while – and I love writing guides that you all want and need – so I thought I would give it a shot.

There are two parts to processing JSON data in Android using NodeJS and Express:

  1. Writing an app capable of processing the JSON data.
  2. Writing a backend capable of producing the JSON data to be processed.

Because there are two parts to this, naturally I’ve broken the steps down into two blog posts.

In the first guide – i.e. this one – l’ll walk you through step #1 and teach you how to create an Android app using Android Studio, which allows you to process JSON data from a REST API.

The next post will show you how to make a REST API using NodeJS and Express. (Check back next week, or better yet, sign up to my newsletter).

Read more

OnePlus One ADB Access over Network on Windows 10

So I recently upgraded to Windows 10 and also upgrade my OnePlus One to CyanogenMode 12 (Lollipop). Decided I would do a bit of Android development, so I’ve spent most of the weekend trying to locate some ADB drivers which work with my computer and phone. So far I found nothing.

After trying a number of different versions of the Samsung drivers, following countless guides and shaking my phone very hard, I noticed an option on the phones Developer options called ADB over network. My first thoughts were “this was too good to be true”, but lo and behold, after some investigation it’s far easier than locating and installing drivers which allow me to connect my OnePlus One to my Windows machine for ADB debugging (although, brain surgery is probably easier than that).

So here is how you do it.

Read more

How to clone a GitHub project on Android Studio

You may have read/watched my previous tutorial How to use GitHub with Android Studio 1.x. This is a follow up tutorial which explains how to clone a project that has been added to GitHub. If you’re looking for more in-depth training, check out my ebook How to Use GitHub with Android Studio: A complete step-by-step guide to mastering the technology.

Click here to download an easy-to-follow PDF version of this post

Read more

How to remove a git remote

In the comments of my article How to use GitHub with Android Studio 1.x, Cynthia gets the following error:


can't add remote
fatal: remote origin already exists.
during execution git remote add origin

Read more

How to use GitHub with Android Studio 1.x

Previously, I wrote a post called How to use GitHub with Android Studio, which was based on the beta version of Android Studio. Since then, Android Studio has progressed past the Beta phase and is now officially the primary IDE for Android.

As I expected, they added GitHub support so you no longer have to follow the tutorial in my previous post to use GitHub with Android Studio.

If you’re looking for more in-depth training, check out my ebook How to Use GitHub with Android Studio: A complete step-by-step guide to mastering the technology.

Read more

How to use GitHub with Android Studio

This article provides a basic overview of how to use GitHub with Android Studio. If you’re looking for more in-depth training, check out my ebook How to Use GitHub with Android Studio: A complete step-by-step guide to mastering the technology.

Click here to download an easy-to-follow PDF version of this post Read more

How to push to a remote Git repository over SSH with private/public key authentication using Android Studio

Android Studio is currently in Beta phase. However given that it is most likely to supercede Eclipse as the next Android IDE, I thought it would be a good idea to start using it now to develop my apps.

Like many software engineers, I use Git as my source control software. I have a set of Git repositories that I keep on a Digital Ocean cloud virtual machine. This serves as a central place to store my code as well as a backup in-case my hard disk fails or someone comes and steals my computer (knock on wood).

When I first started using Android Studio, it took me some time to figure out how to work from  a remote Git repository over SSH using private/public key authentication. As a result, I wrote this guide on how to do it.

At the time of writing this guide, I am using the following on my development machine:

Read more