background preloader

Android development

Facebook Twitter

Detecting an incoming call coming to an android device. Using GreenDao with Android Studio IDE. In this tutorial we will show you step by step how we have created sample application that presents our own Android Studio-GreenDao communication module.

Using GreenDao with Android Studio IDE

We tried to focus mainly on the implementation of database in freshly created Android Studio project and took other factors (such as layouts, modularity etc.) with a grain of salt. For those who haven't checked our Git yet - you can find our GreenDao module here. Using Google GSON : Extra Goodies : Part II. We continue with Using GSON from last article, also in case you missed the first article in series here is link.

Using Google GSON : Extra Goodies : Part II

So, here we go with another installment in series. If you want to maintain multiple versions of an object for JSON conversion, Google GSON library has nice @Since annotation for it. This annotation can be applied to fields and classes. For example, suppose you are maintaining the multiple versions of the your REST API and you are using JSON as end response payload. In next iteration of your API you are added some of fields for particular JSON entity and you don’t want to send the newly added fields to previous API version then @Since annotation comes into picture.

To make use of this annotation, you must configure the Gson instance to specific version using GsonBuilder, of course. Output of above as If you are not specifying any version it will include the all the fields regardless of its version. Following listing shows the usage – Using Google GSON : Extra Goodies : Part I. This is follow-up article to previous Getting Started with Google GSON where it shows the introductory material on using the Google Gson.

Using Google GSON : Extra Goodies : Part I

This article shows some extra goodies of GSON library. As there are lot of things to write about these extra goodies, so i splitted long article into 2 article series, So, this part one of it and in coming next article, i will be posting rest of remaining stuff. The beauty in using GSON library is that, it does not require any annotations or configurations for simple conversions. Although it makes use of default configurations to keep things simple. GSON has flexibility in creating the Json from Java object and vice-versa. When you print the json output string created using Gson then you will see output in one line, something like following. Getting Started with Google GSON. In Java world, JSON is becoming de facto standard for data exchange format over XML because of its ease of use and efficiency in terms of transferring it.

Getting Started with Google GSON

If you don’t know about JSON, it is Javascript object notation, a text based data exchange format which is collection of name-value where name is strictly of string type and value can be int, boolean, array or another json object. Dependency Injection with Dagger 2 (Devoxx 2014) Dependency Injection with Dagger 2 (Devoxx 2014) Dagger ‡ A fast dependency injector for Android and Java. The best classes in any application are the ones that do stuff: the BarcodeDecoder, the KoopaPhysicsEngine, and the AudioStreamer.

Dagger ‡ A fast dependency injector for Android and Java.

These classes have dependencies; perhaps a BarcodeCameraFinder, DefaultPhysicsEngine, and an HttpStreamer. To contrast, the worst classes in any application are the ones that take up space without doing much at all: the BarcodeDecoderFactory, the CameraServiceLoader, and the MutableContextWrapper. These classes are the clumsy duct tape that wires the interesting stuff together. Dagger is a replacement for these FactoryFactory classes that implements the dependency injection design pattern without the burden of writing the boilerplate. It allows you to focus on the interesting classes.

By building on standard javax.inject annotations (JSR 330), each class is easy to test. Using ViewPagerIndicator library with Android Studio and Gradle. Android - Retrieve distance from visible part of Google map. Android - how to get distance between two places in kilometer in google map v2 using LatLng. Android chat bubbles. Driving route from my location to destination in Google Maps Android API V2. Tutorial: How to play animated GIFs in Android – Part 1. Animated GIFs in Android is a difficult topic.

Tutorial: How to play animated GIFs in Android – Part 1

It is an issue that has been discussed heavily and still, it is very difficult for developers to bring GIFs to life. There are three ways to animate GIFs on Android, each of them has its pros and cons. Each part of this series will cover one of these approaches. Getting started For this example, we will use an image I found on, it’s this one:

A few problems with maps and location listeners - Android.

Push Notification

Android GPS, Location Manager Tutorial. Android Google Maps V2 Tutorial. August 25, 2013 10:16 AM If you have developed any app that contains Google Maps v1, It’s time to upgrade it to Google Maps V2 as google maps version 1 deprecated officially on December 3rd, 2012 and it won’t work anymore.

Android Google Maps V2 Tutorial

This article aims to give knowledge about how to implements newer Google Maps into your applications. If you have already worked with V1, implementing V2 is very easy. Refer Google Maps Docs for any topic that is not covered in this tutorial. Before starting a new project, we need to go through some pre required steps. Android HTTP Access. Android HTTP Access - Tutorial Copyright © 2010, 2011, 2012 Lars Vogel Performing HTTP operations with Android This article describes how to access web resources via HTTP in Android.

Android HTTP Access

It is based on Eclipse 3.7, Java 1.6 and Android 4.0 (Ice Cream Sandwich). 1. Android contains the standard Java network package which can be used to access network resources. The base class for HTTP network access in the package is the HttpURLConnection class. The preferred way of accessing the Internet according to Google is the HttpURLConnection class, as Google is focusing their efforts on improving this implementation. Simple-HTTP-Client/src/com/devstream/http/ at 7b2202d1c8a3e5533d913ee35eba5fa5280e2792 · znq/Simple-HTTP-Client.

Platform Versions. Google Play Install Stats The Google Play Developer Console also provides detailed statistics about your users' devices.

Platform Versions

Those stats may help you prioritize the device profiles for which you optimize your app. This page provides information about the relative number of devices that share a certain characteristic, such as Android version or screen size. How to draw charts in Android. Achartengine - Charting library for Android. AChartEngine is a charting library for Android applications.

achartengine - Charting library for Android

It currently supports the following chart types: line chart area chart scatter chart time chart bar chart pie chart bubble chart doughnut chart range (high-low) bar chart dial chart / gauge combined (any combination of line, cubic line, scatter, bar, range bar, bubble) chart cubic line chart All the above supported chart types can contain multiple series, can be displayed with the X axis horizontally (default) or vertically and support many other custom features.

The charts can be built as a view that can be added to a view group or as an intent, such as it can be used to start an activity. The model and the graphing code is well optimized such as it can handle and display huge number of values. AChartEngine is currently at the 1.0.0 release. Find us on Facebook, too: Read a short introduction to AChartEngine here: How To Program Google Android. How To Program Google Android Reto Meier is a software engineer in London. He blogs about technology, programming & Google, and is author of the book Professional Android Application Development. About a year ago Google and their Open Handset Alliance Partners made a lot of noise about Android. At the time it was nothing but a pre-beta SDK and an earnest promise of hardware, but barely a year later the first Android phone – the HTC G1 – is now available in the US and UK. Geolocation - Good way of getting the user's location in Android.

Swf player

How to programatically create and read WEP/EAP WiFi configurations in Android.