Tag Archives: Bundle

How to configure Firebase Google-Services.json for different targets in iOS?

By | November 2, 2018

Once you have different Google-Services.json for different targets for your firebase applications, you may be wondering how all can have same filenames and configure for different targets. However the solution is simple. Initial Steps * Create new directory for each directory inside for project folder. Make sure the folder name is different from the target… Read More »

Floating Button like Facebook Chat in Android

By | June 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 »

CardView Demo in Android L

By | February 11, 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..  

Sync Adapter in Android – A Simple Example…

By | July 6, 2015

Hello all, In Today’s article we will be discussing about the SyncAdapters in Android. SyncAdapter is just a simple plugin like structure for syncing your server and Device. Check out this post about Account authenticator before proceeding. Why do we use SyncAdapter instead of Using Alarm Manger to Sync? Automated execution     Sync can be requested… Read More »

Using Meta-data in Android Manifest and accessing it.

By | October 3, 2013

Sometimes you have the need to set up some app-wide configuration information in an Android app or need to create a class that can be used in multiple projects with a generic way of setting configuration values. This is particularly useful for things like API keys that will probably be different across apps but should… Read More »

How to load a spinner with values from SQlite Database in android?

By | November 18, 2012

Here is a simple example showing how to load a database values in a spinner in android. OK we will start. This is the layout for the spinner row. spinner_row.xml This is the layout for the interface. activity_main.xml Now this is the MainActivity.java file that uses the spinner and the database. Join the Forum discussion… Read More »

How to read and write files to SDCARD and application SandBox in Android – A complete example?

By | February 14, 2016

Here is a complete example of How to read and write files to SDCARD and application SandBox in Android. First create a new project and inside the mainActivity paste this code. Now create another class named MyFile.java and copy this code into it. Now the layout for the xml file. Note you should give this… Read More »

How to download a file to your android device from a remote server with a custom progressbar showing progress?

By | March 4, 2016

Actually this is really simple. I have already posted an example for how to download a file in this post. How to Download an image in ANDROID programatically? This is another one little different with a progressbar included. Previously I have shown three other methods to upload files to a server. Check these posts to… Read More »

JSON IN ANDROID.

By | June 20, 2012

Complex JSON String parsing in ANDROID http://www.coderzheaven.com/2011/06/10/complex-json-string-parsing-in-android/ Parsing JSON Object in ANDROID. http://www.coderzheaven.com/2011/06/09/parsing-json-objects-in-android/

Passing data between Intents or classes in ANDROID?

By | March 29, 2012

Many of our application reqiures sending data from one intent to another. This is done by putting data into one intent using putExtras() and getting it in the other intent using the getExtras() which matches the string value. However you can pass string, boolean, integer etc between intents. For passing data between intents you need… Read More »

How to place layouts one over another in android using addContentView()?

By | February 10, 2012

Hello all… In today’s tutorial I will show you how to add different layouts one over another in android through java code. For this we use the function addContentView() which is a variation on setContentView(View, android.view.ViewGroup.LayoutParams) to add an additional content view to the screen. Here I will create an xml with a textView and… Read More »

How to use Preferences in android?

By | February 9, 2012

Hello all… Today I will show you how to use preferences in android? First we will create preferences using Create a folder named “xml” inside the “res” folder and inside that create an xml named “preferences.xml”. Now create a java file named “PreferenceDemo.java” in your src folder and copy this code into it. Now in… Read More »

Show Alert in cocos2D Android.

By | June 26, 2012

Here is a simple example showing alert in android cocos2D. For this I am using an example from my previous android cocos2D tutorial.. So please read that tutorial before reading this because the I am using the classes and files from it. I am only changing the Gamelayer.java file to show an Alert Dialog when… Read More »

Central aligning the default message text in AlertDialog in android.

By | January 10, 2018

Hello all.. Today I will show you how to align the message text to center in an AlertDialog. By default it is left aligned, so we have to get a reference to it to align it to center.This is how we do it. Please leave your valuable comments on this post.

Complex JSON String parsing in ANDROID

By | May 3, 2012

Hello all….. In the previous post I have shown you how to parse a Simple JSON String in ANDROID. In today’s tutorial I will show you how to parse a complex JSON String. Take a look at the example Here the JSON String used is Now let’s dothe operation……….. Please check the Logcat for the… Read More »

Parsing JSON Object in ANDROID.

By | May 23, 2012

JSON are alternative to XML and easy to understand than XML. As other languages Java also supports JSON parsing. Here is a simple example of JSON parsing in ANDROID. This is the JSON String that I am going to parse. And this JSON is same as this xml. Here is the code for this parsing.… Read More »

TextView with link in ANDROID…….

By | June 24, 2012

Hi all……. All of you may be familiar with TextViews in ANDROID. But how many of you know that we have have html as text in a textView. This post is a simple example to show this. Create a fresh project and copy this code to the main java file. The main.xml The AndroidManifest.xml file

How to split a String in ANDROID?

By | May 5, 2011

Hi all….. Splitting a string in android is really easy.checkout the following snippet. Check the Logcat for output. Note: Make sure to put the escape character before the delimiter for splitting,otherwise the output may be each character.

Email validation in ANDROID.

By | May 24, 2012

This is a simple example showing email validation in ANDROID. This example uses regex for email validation. Create a button and an edittext in your main.xml file and try this code. Check this link to find how you can send email from android programatically. Please leave your valuable comments……

How to get notified during an incoming call and get that number inside your program in ANDROID?

By | April 24, 2011

Hi all……. In today’s tutorial I will show you how to get the incoming phone number inside your application. In many situation we may need this. For this we need to have BoradCastReceivers. Inside this class we create an object of the TelephonyManager class ang register with the sytem service.Now we have to make another… Read More »

SQLiteManager plugin for eclipse

By | January 9, 2017

When you are working on an Android application that stores data in a SQLite database.There arise many questions like where does this database file get stored on the filesystem ? How can we access the database? I will give solution to all these problems. I created the SQLite database from my previous post about Using… Read More »

How to use SQLite in ANDROID, A really simple example.

By | August 23, 2012

Hello ANDROID Lovers…….. In today’s tutorial I will show you how to deal with SQLite Databases in ANDROID. You know that SQLite are Lightweight databases which is maintained only on the client side. They don’t need a server. The SQLite databases are simply a file wrapped around with some stuff which helps us deal with… Read More »

Text to speech in ANDROID, A Simple Example.

By | April 23, 2012

Hello everyone…….. In this simple example I will show you how to use Text To Speech in ANDROID. This is one of the unique features in ANDROID. Unlike iPhone , ANDROID has a built in TTS Library which supports many languages. But iPhone doesn’t have this feature. They have to depend on third-party software for… Read More »