Category Archives: ANDROID

Volley Demo in Android

By | April 10, 2016

Volley is an HTTP library that makes networking for Android apps easier and most importantly, faster. Volley is available through the open AOSP repository. Volley offers the following benefits: Automatic scheduling of network requests. Multiple concurrent network connections. Transparent disk and memory response caching with standard HTTP cache coherence. Support for request prioritization. Cancellation request… Read More »

Best Coding Practices in Android – Part 2

By | April 5, 2016

You can read the First Article about Best Coding Practices in Android here. Re-Use Elements and Layouts Use for reusing layouts. You can read about this from here. Use Different resources for different density Screens. Properly organize your images in mdpi, hdpi,xhdpi etc folders for corresponding screens. This helps to prevent blurry images. Read more… Read More »

Best coding practices in Android Part 1

By | April 5, 2016

Following conventions. Do not try to create a new convention for coding. Follow the standard convention. Like Class Naming. File Naming. Variable Naming. Code commenting. Code intending. Use Memory Efficient Structures The above code results in unnecessary Integer objects created. Android provides data structures which are more efficient for mapping values to other objects. This… Read More »

RecyclerView Simple Example in Android.

By | March 25, 2016

The RecyclerView widget is a more advanced and flexible version of ListView. This widget is a container for displaying large data sets that can be scrolled very efficiently by maintaining a limited number of views. Use the RecyclerView widget when you have data collections whose elements change at runtime based on user action or network… Read More »

Custom Transitions in Android M using RippleDrawables

By | March 20, 2016

Ripple Drawables. Touch feedback in material design provides an instantaneous visual confirmation at the point of contact when users interact with UI elements. The default touch feedback animations for buttons use the new RippleDrawable class, which transitions between different states with a ripple effect. We can either apply RippleDrawable in XML or using Drawable XML… Read More »

Bluetooth Demo in Android – Listing paired Devies, Find other Online BT devices, Connect to a BT Device, Communicate between connected BT Devices ( Chat ).

By | March 10, 2016

In this Demo we will see Check compatibility of the device. Turn On/Off Bluetooth, Making it discoverable List Paired Devies. Check for Online Bluetooth Devices. Connect with a Device. Communicate between Connected Bluetooth Devices. Disconnect from Device. You can download the complete Android Studio Source code at the end of the post. Before We start… Read More »

Local broadcast events with LocalBroadcastManager in Android

By | March 1, 2016

LocalBroadcastManager is Helper to register for and send broadcasts of Intents to local objects within your process. This is has a number of advantages over sending global broadcasts with sendBroadcast(Intent): You know that the data you are broadcasting won’t leave your app, so don’t need to worry about leaking private data. It is not possible… Read More »

Swipe Refresh ListView using ListFragment and SwipeRefreshListFragment in Android

By | February 25, 2016

This demo shows How to use Swipe to Refresh in ListViews and ListViewFragments. You can download the complete Android Studio Source Code at the end of the Post. 1. Using ListFragment 2. Using SwipeRefreshListFragment You can download the complete Android Studio Source Code from here. You can send your valuable comments @coderzheaven@gmail.com.

SnackBar and Floating Button Demo in Android

By | February 22, 2016

Snackbar is a UI element used for user feedback, just like a Toast except they provide action to interact with. Snackbar will be displayed at the bottom of the screen and can be swiped off in order to dismiss them. Floating Button sits on the top of your layout and provides a way for a… Read More »

Adding Notifications, Reading Notifications, Getting number of notifications in Android M.

By | February 20, 2016

This demo will show how to 1. Create and add a new Notification, 2. How many notifications are active in the current Application? 3. Delegate method for Notification Deletion. For Adding a Notification we can use the following snippet. For reading the number of currently Active notifications we can use To know when a Notification… Read More »

Uploading Image to Server – Android Eclipse Version.

By | February 18, 2016

Hi all, In today’s tutorial I will show you how to send an image to server using POST method in ANDROID. If you are working in Android studio, then checkout the article here. Uploading an image to server is a basic requirement in many of our application. Sending data to server which is using a… Read More »

MapKit Demo Swift – Annotation, Custom Annotation, Custom Annotation with Button, Search, Showing Directions – Apple Maps iOS

By | February 14, 2016

Hi all, In this Demo I will show How to implement Apple ‘s MapKit on iOS. This demo will show following this. 1. Show Annotation in Maps. 2. Show Custom Annotation in Maps. 3. Show Custom Annotation with Custom Button in Maps. 4. Pin Point to location from Search. 5. Showing Route/Direction between two location… Read More »

CardView Demo in Android L

By | February 10, 2016

Here is a simple CardView Demo in Android. This demo shows how you can apply Corner radius and Shadow in Android L. Here is the Activity. This is the Fragment that adds the CardView. The Layout for the Activity. Fragment for placing CardView. You can download the complete Android Studio Source Code from here..  

Custom Transitions in ANDROID.

By | February 5, 2016

Here we are going to create custom transitions for a fragment. We will create transitions using Java classes by extending the Transition Class in Android. ChangeColor.java is the java class that extends transition. ChangeColor.java CustomTransitionFragment is the Fragment to which we are going to apply the transition. The MainActivity that adds the fragment. Download the… Read More »

Display Route between two places in Google Maps V2

By | February 3, 2016

Hi all… Yet another post on Google Maps.. In this demo I will show you how to show a route between two places in Google Maps V2.     Hope you have gone through my previous posts before. If not please check here. You need to set up Maps Correctly for it to load. Lets… Read More »

Create Custom Notification in Android.

By | January 31, 2016

This demo explains how you can create a Custom Notification in Android old and New versions. The notification appears expanded in Versions > 16. Let’s jump into the code… Below is the MainActivity that creates the notification. You can download the complete Android Studio Source Code from here.. Send your comments to coderzheaven@gmail.com

ActionBarActivity deprecated..

By | January 28, 2016

ActionBarActivity is now deprecated.. Check out what Google says about using AppCombat. The AppCompat Support Library started with humble, but important beginnings: a single consistent Action Bar for all API 7 and higher devices. In revision 21, it took on new responsibility: bringing material color palette, widget tinting, Toolbar support, and more to all API… Read More »

Starting with Material Design in Android – Volume 1

By | September 19, 2015

1. To create apps with material design: Review the material design specification. Apply the material theme to your app. Create your layouts following material design guidelines. Specify the elevation of your views to cast shadows. Use system widgets for lists and cards. Customize the animations in your app. 2. Apply the Material Theme To apply… Read More »

Show Download Progress in NotificationBar in Android with Notification Event Listeners

By | August 30, 2015

Below Sample code shows you how to download images from a url with progress in the notification bar. “NLService” Class is the actual Notification Listener class that can hear events in your notification. But before everything you need to be sure that, you have enabled notification access for your app. Make sure you add the… Read More »

NSNotificationCenter Example in Swift

By | July 15, 2015

Here is a simple demo on how to use “NSNotificationCenter” in swift. NSNotificationCenter is particularly useful when there are multiple class or struct instances that need to take action based on something that happens elsewhere in your application. To Register the notification… we will call Now to trigger the notification… The “notificationKey” should be unique… Read More »