Category Archives: ANDROID

Bottom Navigation in Flutter

By | April 18, 2019

This article shows how to implement Bottom navigation using Tabs in Flutter.     Watch Video Tutorial     For that we need to have a TabController and a TabBarView Widget.   Create Tabs   This is our demo tab layout widget. Create a new file name FirstTab.dart and copy the contents into it. You… Read More »

Flutter – Android, iOS , Native communication Simple Demo

By | December 25, 2018

Hello Devs, You know flutter is now a hot topic. Learning flutter will always help in your future career. In this article we will see how we can communicate between Flutter and Android. Watch Video Tutorial MethodChannel Flutter communicate with Native using “MethodChannel“. So you have to create a method channel with a constant as… Read More »

Is Javascript Multithreaded? How it handles asynchronous actions?

By | December 13, 2018

Javascript is a single threaded application. That means you cannot run more than one script at one time to modify DOM or something. But there are something called “Worker Threads” that spans separate threads outside your application that can do complex tasks which is linked by a Callback method. What is a Web Worker? When… Read More »

What is Context in Android and What is the proper way to use it?

By | December 12, 2018

Lets see what a Context is… Context : Current State of the application. Context : Handle of the application. Context : Provides access to the resources, preferences, accessing database etc. Activity inherits from the Context. Context is the most important part of the Android application and its everywhere. If you wrongly use Context, it can… Read More »

Using Content Resolver to List Contacts – Android

By | October 30, 2018

Here is a simple example to list contacts in android using the Content Resolver. Note : You need to have two things before accessing contacts. 1. Contacts Permission in the Android Manifest 2. Ask Runtime permission from the user Code Here is our MainActivity that lists the contacts. MainActivity.java Adapter Class Below is the adapter… Read More »

Simple Interview Question and Answer – 1

By | September 29, 2018

Question John works at a clothing store. He has a large pile of socks that he must pair by color for sale. Given an array of integers representing the color of each sock, determine how many pairs of socks with matching colors there are. For example, there are socks with colors . There is one… Read More »

Project Treble – Android Version Fragmentation Solved

By | August 24, 2018

Solved Yes, a longtime problem with Android has been solved. Yes, version fragmentation problem. Version fragmentation is often Android from different manufacturers had been stuck on different versions which makes it difficult for developers to support all variety of devices. Hopefully the problem is going to be solved. From Google’s perspective, an OS rollout is… Read More »

How to listen to events from react native?

By | August 12, 2018

Hi friends, This is essentially a continuation of this post http://www.coderzheaven.com/2018/08/10/how-to-create-a-custom-native-imageview-in-android-for-reactnative/ Now we will listen to a click event from the image we just created. For that we have to add the ClickListener to the image in Android. Add below methods to the java class On the React Native Side The whole java class will… Read More »

How to create a custom native ImageView/View in Android or iOS for ReactNative?

By | July 11, 2018

Many times we need custom components from native. Here is a simple example on how to create a custom imageview in Android for react native. First we will start with the Android Version Android Create a class that extends SimpleViewManager. Write a setSrc method which accepts the source url from React Native. Implement ‘createViewInstance’ method… Read More »

Awesome React Native Image Caching Libraries

By | July 4, 2018

Image Loading and caching had been a little bit pain in react native. In-fact react native didn’t had native support for caching. But after the recent release, there is now support for caching in iOS only. Still not for Android. You can read more about this from here https://facebook.github.io/react-native/docs/images.html#cache-control-ios-only Now these are the variety of… Read More »

Top 10 most downloaded and used mobile apps

By | July 31, 2018

Studies show that we spend more time with our mobile devices every day, either working or enjoying our leisure time. And we use apps in these devices . But what are the ones that we use the most? Sensor Tower is a company dedicated to the marketing of mobile applications, which periodically publishes a report… Read More »

Free Daily News App

By | August 7, 2018

Download our free news app and get instant news from popular news channels instantly. Get the app from here… https://play.google.com/store/apps/details?id=app.mobile.daily_news          Please download and leave your valuable feedback as well. Why you will download this app? Fast and efficient. Incorporates news from all famous news channels. Consumes minimal battery. No intruding ads… Read More »

How Image Loading Libraries work in Android?

By | July 11, 2018

In this article, Lets find out how the image loading libraries like Picasso, Glide and Fresco works. We know that images are the one which takes most of the space in our application either in App size or the memory at runtime. Also using large number of images often kicks off Garbage Collection (GC) Events.… Read More »

How to encrypt and decrypt an audio file in Android?

By | May 8, 2018

Here is a simple example to encrypt and decrypt a audio file in Android. We will directly go to the implementation part. Demo Video You can check the demo video here. Download Library You can download the simple library from here. Aim Download an audio file from internet. Encrypt and save the encrypted file in… Read More »

Android’s new D8 dexer

By | May 9, 2018

Google has now come up with a new compiler for Android, the D8. This one is basically improved and efficient compared to the DX compiler. Google had shipped the D8 compiler along with Android Studio 3.0 with a opt-in feature. In the initial phase the default compiler would be DX, then Google will deprecate it… Read More »

What are promises in React Native, How is it different from Callbacks?

By | May 9, 2018

Basically saying both are same. But there are some differences. Lets see what are some of the advantages of Promises. Promises are just a cleaner way for running asynchronous callbacks. Promises also has error catching mechanism which are not in callbacks. Promises are an abstraction for cleaner and better functional code. What are callbacks? Callback… Read More »

React Native Module Bridge Example

By | July 12, 2018

The document demonstrates the steps to create react native module bridge in Android and iOS. Below are the steps for creating a native bridge in Android. ANDROID Open the Android Studio with the corresponding project from your react native project. Step 1 : Create the Java class that extends ReactPackage. (eg: AndroidModulePackage.java). Implement the interface… Read More »