Skip to main content

Posts

RETROFIT HTTP LIBRARY - ANDROID TUTORIAL

Retrofit is same as Volley and it is definitely the better alternative to volley in terms of ease of use, performance, extensibility and other things. It is a type-­safe REST client for Android built by Square. Using this tool android developer can make all network stuff much more easier.  Now let’s see the action of retrofit by creating a new project.  As an example, we are going to download some json and show it in RecyclerView as a list. Step 1. Create a new project in Android Studio Step 2.  Open build.gradle and add Retrofit        compile 'com.squareup.retrofit2:retrofit:2.1.0' make change over dependencies dependencies {     compile fileTree(dir: 'libs', include: ['*.jar'])     testCompile 'junit:junit:4.12'     compile 'com.android.support:appcompat-v7:23.1.1'     compile 'com.android.support:design:23.1.0'     compile 'com.squareup.retrofit2:retrofit:2.1.0'     compile 'com.a

LOAD DATA FROM SOAP WEB SERVICE - ANDROID TUTORIAL

In this post I explain how to load and send data from SOAP web service in your android application. What is SOAP? SOAP is a standards-based web services technology that allows providers to abstract data and transport implementations over the web. It relies on Extensible Markup Language (XML) for its message format, and usually relies on other Application Layer protocols, most notably Hypertext Transfer Protocol (HTTP) and Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission. Now we will see it though an example(here the data is fetch from web and set in drop-down) Step 1. Create new project in Android Studio. Step 2.  Before we start creating our project we need external library for SOAP to load data from SOAP based web service. I use KSOAP2 library to load and send data to service. You download from here  or add the dependencies in build.gradle as given, compile 'com.google.code.ksoap2-android:ksoap2-android:3.1.1' and r

Bluetooth Chat Application - Android Tutorial

In this tutorial, we will see about how to design an Android layout for chat application using Chat Bubbles  and the main part is chat via Bluetooth . Main objective of this post is to give an idea about how to allow two-way text chat over Bluetooth in android. Bubbles: Chat bubbles are background image that expands horizontally and vertically as required based on the message posted. Bubbles are Nine-patch Images. Image Nine-patch Image In creating Android chat bubbles, nine-patch image plays a crucial role.  Nine-patch image  is a bitmap which stretches to fit the content posted in the View where it is applied as a background. A NinePatch drawable is a standard PNG image that includes an extra 1-pixel-wide border. It must be saved with the extension  .9.png , and saved into the  res/drawable/  directory of your project. The border is used to define the stretchable and static areas of the image. You indicate a stretchable section by drawing one (or more) 1-pixel-w