Skip to main content

Posts

Showing posts from December, 2017

How to Read and Write JSON data in Kotlin with GSON

Kotlin is now official language for Android development and it is well supported in Android Studio. So here in this tutorial, we are going to learn about how to read and write JSON data in Kotlin using GSON. If you would like to learn the java version of this tutorial check out the last tutorial " How to Read and Write JSON data using GSON ". Introduction In this tutorial, we will write two methods. In the first method, we will create a JSON file and in second method we will read the file and print in a text box.  If you like to know more about the basic entity of JSON you can check out Basic JSON entity here . What is JSON? JSON stands for J ava S cript O bject N otation JSON is a lightweight data-interchange format It is "self-describing" and easy to understand JSON is language independent and can we used in any language JSON Syntax Rules Data is in name/value pairs Data is separated by commas Curly braces hold objects Square brackets hold

How to Implement google SignIn API Android Example

Implementing SignIn method is one of the very important requirement for any standard application. You may already implemented the SignIn method to your app or may be not done.  But, In both case it is important to implement  the social SignIn and Sign-up method to your app. Why you should integrate the social SignIn and SignUp method? We have several benefit if we implement the Social SignIn method. You may don't have any backed to handle the user authorization to validate the genuine user May be you have backed but still its very useful to integrate the social SignIn and Sign-up, because Social login is very fast Social login is one click Sign-up option, which make user on-boarding very easily Many users not prefer to provide lots of info in your long user registration form Prerequisite for this tutorial of " How to implement google sign in Android Example " You need a working google account Latest version of android studio A project configured to co

How to Read and Write JSON data using GSON

JSON stand for JavaScript Object Notation . In today's development world online application design is not possible without the skills of the JSON. Every application need to read and write the data into JSON format. So, here in this tutorial we are going to learn about " How to Read and Write JSON data using GSON" Here JSON means we need to add com.google.code.gson:gson:2.8.0 as dependency in our application build.gradle file. So before starting this tutorial you should create a Simple Project with name of "JSON Tutorial" or any other name you per your preference. For more advanced use of JSON, read below tutorial:- WP Android App using REST and volley WP Android App using REST and volley part2 JSON Basic Element A JSON object contain many part. Here is the details about how data are stored into the JSON file. JSON Array([) In a JSON file , a square bracket ([) represents a JSON array, we can retrieve the JSON array using the below method. JSONArray jsona

WP Android App using REST and volley part2

In last part of WP Android App using REST and volley tutorial we have learned to set up the basic UI of our WP app. In this part we will learn how to implement the below two features for our WP app. Retrieve the sort description of the post and show in WP app Show the featured Image in WP app So first we will start by retrieving the short description of the post and show that description in our WP app. In last tutorial we only show the title of the post, but we know showing only short title will not describe the post very well, so we should show some short description about the post. For this we don't need to do much work just need to retrieve the excerpt tag from the JSON Object that we have already fetched during retrieving the list of all post for our WP android App. Below is the link of the series or Article of WP android App WP Android App using REST and Vollery Part1 WP Android App using REST and Vollery Part2 LiveData and ViewModel for WP Android App usi