Skip to main content

Posts

Showing posts from February, 2018

Push Notification on Android Using Firebase Cloud Messaging

Push notifications are the very useful way to keep your user engagement by sharing the valuable information to the user. So today in this tutorial we implement the Push Notification for Android App. This tutorial has two parts First Create the Project and setup the Project on Firebase Cloud Messaging Second Implement the Code on Android App So let's start the action and create a Simple Project in Android Studio and give a nice name like Push Notification. Setup the Firebase Cloud Messaging So before starting the coding for your app, you need to create a project on google firebase cloud. So kindly go the firebase console . If you don't create the any project before then you have to create a new project inside the firebase console. So input the details of your project like given below and create the project. Once you have created the project as above then we have to create the app by selecting the type as android as given below. After the above steps, you will get the opt

How to List all Internal and External Android Storage

Android Storage Manager is the system service which provides the functionality to list and access the all Storage Volume of an Android Device. We always required to save and read the files from Internal and External storage depending on the app requirement but accessing that SDCARD is sometimes difficult. So in this tutorial, we will explore the way to how to access the storage volume using Storage Manager as well as other methods. Let's create a sample project to go step wise step in this article. Create an instance of Storage Manager system Service in Android First of all, we are going to find the way how to list all SDCARD using the Storage Manager and Storage Volume system service. So let's create the instance of Storage Manager system service as given below. Java StorageManager storageManager= (StorageManager) this.getSystemService(Context.STORAGE_SERVICE); Kotlin var storageManager:StorageManager = this.getSystemService(Context.STORAGE_SERVICE) as StorageManager Here in a

Network Paging With Paged Key DataSource and REST API

Paging Library is the library provided by Google as part of Architecture Component for using the pagination of the resource. It is helpful to create the pagination from Database using Room as well as with network resource. Here in this article, we will explore the how to use it for Network Paging with backend DataSource. Why Paging required? Imagine a scenario where you have thousands of records on your backend which you have to display to the user, but not all data only 10 records. You can't show all the records to the user at once. If you are going to load all the records from backed and display only 10 or 100 records to the user at once. So why we should load the all data if we just showing only 10 or 100 records at a time. Here the concept of pagination comes into the picture. There are several ways to achieve that but recently Google has released some of the very useful libraries as part fo Architecture Components. Paging Library is one of that which help to create the mobile

Saving Apps Data In Android Using SharedPreferences

Saving Apps Data in Android App Development is the one of the very important and there are multiple ways to store the data on an android device. We can save the data using the following method. SharedPreference Save data into files SQLite Database Room Database Depending on our requirement we choose which method is best suited for our apps. In this tutorial, we are going to take a look at SharedPreferences. Saving Apps Data using SharedPreferences First of all, we are going to explore the SharedPreferences. SharedPreferences is very useful where we want to store some key-value pair or we can say a small amount of data. Let’s assume a scenario where you want to check that whether the app is going to open the first time or previously its has open to the user. If the user is opening the app for the first time then you want to store the name, email and mobile number of the user or if not then you just want to show these details under user profile section. So this kind of da

WordPress Android App with REST API And Retrofit

Retrofit is the library which converts your JSON data into Java object. In this tutorial, we will learn about how to implement the Retrofit to create a WordPress Mobile App. As we all know, WordPress is the one of the biggest CMS (Content Management System) of the world. Wordpress full fill the requirements for all most every type of the website. So, in this tutorial, I am going to learn how to create an Android App using the WordPress REST API and Retrofit. What is Retrofit? If you want to know about Retrofit, I would like to give you just a simple one-line explanation of the Retrofit. It is a library which converts your REST HTTP request to Java interface. We will learn how we can do all these stuff using some very simple steps. Further, you can check the Retrofit Library here . So, In this tutorial, we will use the Retrofit to retrieve all post and there except ( A short Description of Post) form a WordPress website. Prerequisite for using the Retrofit for WordPress Android App Ther

Architecture Components: Paging Library With Room Database

Paging Library is one of the main parts of the complete set of the Architecture Components Library for MVC app development.  Architecture Components Library includes ViewModel , LiveData , RoomDatabase and Paging Library. In this article, we will create a TODO app that loads the paged data from Database. Architecture Components Paging Library Paging Library includes the DataSource , PagedList , PageListBuilder and PagedListAdapter . We will go through each component one by one. But first of all, What is paging Library? Paging Library is a set of the component which helps app developer to load the data from backed gradually as it required. For example, an app loads thousands of line from the database or network but that all data can’t be display at once to the user. Just a small portion of all those data will be displayed to the user at a time. But if the app goes to load all these data at once then it creates the huge burden on the network and slows down the app as well. If we load