Archives for Android - Page 13

Android

Getting started with Google Maps Android API V2 – Part 1

Google Maps provides to Android developers a powerful API to display maps in applications. Google Maps API V2 is now part of Google Play Services. 1. Get Google Play Services First, you need to get Google Play Services to use in your Android application. If you use Android Studio, you must simply add the following dependency to your Gradle build…
Continue Reading
Android

How to get user current location with GPS or Network in Android?

Thanks to smartphones, modern mobile applications can benefit from GPS installed to get user current location. This information adds a lot of value to an application. Web’s giants have understood this since long time. So, in your next application, you could use GPS or Network to get user current location and add value to your application. For example, if you…
Continue Reading
Android

How to check if internet connection is enabled in Android ?

Today, a simple article exposing a snippet code lets you to know if user’s internet connection is enabled in Android. It can be very important to know if user is connected before to send internet requests that are useless. First, you must add following permissions to your Android Manifest : <uses-permission android:name="; /> <uses-permission android:name="; /> I presume that you…
Continue Reading
Android

Learn how to parse JSON in Android with Gson

Previously you had learnt to consume a REST Web Service in JSON and parse result to display data in an Android application. To start from basics, I show you raw method that uses only standard SDK and no third-party libraries. I think it's better when you begin to understand how things work. Now, you know raw method so we can…
Continue Reading
Android

Create an Android Weather app step by step – Part 1

In this tutorial serie, you're going to learn how to create an Android Weather app step by step. You could already see the final result of the tutorial :  Current Weather Forecasts The goal is to show you the following steps for the creation of our Android Weather app : Step 1 : Design Step 2 : Architecture Step 3…
Continue Reading
Android

How to pick an image from Gallery and use it in Android ?

In Android applications, it can be useful to offer users the possibility to pick an image from their Gallery. When image is picked, you can then use it in a wallpaper for example or to work on the image depending the purpose of your application. To achieve that, you must first launch the intent ACTION_PICK to let OS prompt dialog…
Continue Reading
Android

Learn to consume a REST Web Service and parse JSON result in Android

In mobiles applications, very often you should get data from a Web Service to update content displayed to users. For example, you can imagine a weather application that needs to request weather data from a remote server. Content getted can be under different formats but JSON format is one of the most used format with REST Web Service. So, you're…
Continue Reading
Android

First steps with Android Wear

Announced during Google I/O 2014, Android Wear is the Android platform for wearable devices. It extends the Android platform to a new generation of devices with a user experience targeting wearables' specifities. Actually only Smart Watches are supported by Android Wear but trust that Google will extend the platform into other forms of wearables in the near future. Actually, Android Wear…
Continue Reading