ng-repeat Simple Demo in Angular JS with filter

By | September 15, 2017

ng-repeat. Example Now we will do a filter Search Filter In the above example if we want to search by country we will modify the code like below will search in country fields of the employees only and the boolean value from the checkbox will look for the exact match from the checkbox. Complete Example

Do we need to call the Garbage Collector manually ( System.gc() ) in Android?

By | September 5, 2017

This is a common question. Eventhough the Android System calls garabage collector at appropriate times, this usually will not be adequate. Because the system calls GC at intervals, most of the time it wont work perfect and causing unnecessary pauses in the application. If these pauses are more than 16ms, then the user will notice… Read More »

How to write Simple Animation while setVisibility.GONE in Android?

By | September 5, 2017

Automatic animations on Layout Change If you want to animate views in a layout without writing big codes. Here is a Simple way. Find the root element of the layout and add this property to it. Adding Manual Animations Fade Out Animation Fade In Animation Move Down by height Translate animate to origin Position Adding… Read More »

How to add finger print authentication in Android.

By | August 30, 2017

Android 6.0 saw the introduction of fingerprint authentication, a new security feature that allows users to confirm their identify with a single touch. Well, after that this has become a common way of authentication for users. Advantages Very easy, fast and convenient to use for authentication Don’t need to remember No struggling with the keyboards… Read More »

How to do a List filtering in Angular JS?

By | August 20, 2017

Filtering is really easy in Angular JS. In Angular JS we use the “filter” keyword to do the filtering. Example Copy and paste the above code in an html and run. You will see the result. Here we have a variable named “my_search” which is a textbox in HTML. so the filter value is taken… Read More »

Class has not initialiser error in Swift – Solved.

By | August 14, 2017

Apart from other languages, when you write a class in Swift, It should have a initialiser. To solve this we have to write init() function in that particular class. Just like below. For example, look at the below class. Here we have 5 variables. The above error usually comes when you don’t initialize all variables… Read More »

What is Scope and RootScope in Angular JS? with examples

By | August 10, 2017

Scope Scope is the binding part between the HTML (UI) and the Javascript (the Controller). Scope object contains the available properties and methods. Scope is accessible in both HTML and Javascript. Scope Example Root Scope Root Scope is created on the HTML element that contains the ng-app directive Root Scope is available for the entire… Read More »

How to find location in Android using GPS?

By | July 25, 2017

This example helps you to find the location in Android using the GPS. I have commented out some functionality in the code. You can uncomment it and extend it at your wish. At first we will create a utility class that will handle all GPS related Operations. GPS Utility Class This class has all utility… Read More »

Floating Button like Facebook Chat in Android

By | July 20, 2017

Floating widgets float over the screen over any app that is currently running. Here we will make a floating action button that you can drag around the screen to position and do actions on it. Add Permission For drawing over the other apps, you need “android.permission.SYSTEM_ALERT_WINDOW” permission. So add this entry in your manifest. Our… Read More »

What are Angular JS modules? – A Simple Demo

By | July 15, 2017

Angular JS modules means : An AngularJS module defines an application. The module is a container for the different parts of an application like controller, services, filters, directives etc. The module is a container for the application controllers. Controllers always belong to a module. Example Here we have a module named “MyApp” and controller for… Read More »

Fast and Efficient way to transfer images between Activites in Android

By | July 14, 2017

We often need to transfer images between activities. Well there are many methods to transfer images. You can make the image into a Base64 String and pass it as String argument extra in a bundle between activities You can save it to a disc and read it in the other activity. Well, these methods will… Read More »

Angular JS Directives in Short.

By | July 10, 2017

Here is a comprehensive list of Angular JS Directives. Directive Description ng-app It defines the root element of an application. ng-bind It binds the content of an html element to application data. ng-bind-html Itbinds the innerhtml of an html element to application data, and also removes dangerous code from the html string. ng-bind-template It specifies… Read More »

How to send Send form-urlencoded parameters in post request android volley?

By | June 30, 2017

We have to override the getBodyContentType() method in volley to enable “form-urlencoded parameters” in POST request using Volley. Here is how the code will look like. If you are not familiar with Volley, Checkout my post here on volley. It will give you a perfect picture on what Volley can do. Code – Method 1… Read More »

How to enable the default animation on a RecyclerView when an item is added or deleted?

By | June 25, 2017

You may be knowing that RecyclerView is part of the material design, so it will have the built in animations when you add an element or remove and element. In today’s article, I will show you how to how to do this in a simple way. RecyclerView will perform a relevant animation if any of… Read More »

Bottom Navigation Demo in Android

By | June 15, 2017

To get started with this, you need the latest version (version 25) of Android SDK & tools (including SDK tools, build-tools, platform-tools, support repository). Gradle Add the design support library First step is to add the design support library to your app-level build.gradle file. Example is as shown below: Layout Add the BottomNavigationView to your… Read More »

What are weak references? How it can be used to avoid memory leaks?

By | June 1, 2017

Weak reference objects, which do not prevent their referents from being made finalizable, finalized, and then reclaimed. Weak references are most often used to implement canonicalizing mappings. Suppose that the garbage collector determines at a certain point in time that an object is weakly reachable. At that time it will atomically clear all weak references… Read More »

Android Speech to Text Tutorial

By | June 1, 2017

Android comes with a built in feature for Speech to Text. This is really helpful when you want to provide navigation in your app through voice commands. When you say something in the app, your voice will be streamed to the server and the server will convert it to text and send back. You can… Read More »

What are the different Logging options available in Android?

By | May 29, 2017

Android uses a centralized logging system. However you can write your own custom log statements. Log Statements To write log statements, you use use the android.util.Log class with the following methods: Log.v() Log.d() Log.i() Log.w() Log.e() Log.wtf() They are sorted by relevance with Log.i() being the least important one. The first parameter of these methods… Read More »