Tag Archives: toString

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 »

How to crop an Image in Android?

By | December 15, 2012

This is a sample program that launches the camera and crop the captured image. Check this link to another crop image example. http://www.coderzheaven.com/2011/03/15/crop-an-image-in-android/ This is the layout xml. activity_main.xml Now this is the Main Java File that implements the crop functionality. Here we are using the “com.android.camera.action.CROP” Intent to crop the Image passing the captured… 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 | September 6, 2012

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 read and write a text file that is stored in your application sandbox in ANDROID?

By | April 22, 2012

Hi all….. In this post I will show you how to read a text file in ANDOID. Let your file is in the your application sandbox of your ANDOID project, i.e the file’s location is /data/data/your_package_name folder. To view this folder -> open File Explorer and expand each folder. For this example to work first… Read More »

How to Upload Multiple files in one request along with other string parameters in android?

By | August 16, 2011

Hello everyone, I have shown two methods to upload files in android. In today’s tutorial I will show another simple method to upload files. With this method you can upload multiple files in one request + you can send your own string parameters with them. Here is another method on working with uploading of images.… Read More »

Get a file from PhotoGallery and copy it to your directory in your project resources in Titanium(iPhone or ANDROID).

By | May 3, 2011

This example opens the photogallery and then when you select a file from it , it will be copied to your resources directory. First manually create a directory in your resources, here the directory is named “mydirectory”. Call this functiion inside a button click or something Now after running this code check the directory you… Read More »

Email validation in ANDROID.

By | May 1, 2011

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……

ANDROID – Upload an image to Server in Android Studio

By | April 25, 2011

Hi all, In today’s tutorial I will show you how to send an image to server using POST method in ANDROID. Uploading an image to server is a basic requirement in many of our application. Sending data to server which is using a PHP Script is already explained in this example . Now in this… Read More »

How to get information about all the applications installed in your ANDROID Emulator or Phone? / How to use getPackageManager() in ANDROID ?

By | April 3, 2011

Hi all, In this tutorial I will show you how to get the information about all the applications installed in your ANDROID phone. What you have to do is create a ANDROID project inside the package pack.GetAllInstalledApplications amd name the java file “GetAllInstalledApplicationsExample.java” and copy the following code into it. Here the “getPackageManager().getInstalledPackages(0);” gets information… Read More »

How to get a selected Item from a spinner in ANDROID?

By | February 28, 2011

We have come across this issue many times during programming to get a selected item in your combobox. ANDROID has built in functions to get the selected item from a spinner. Take a look at the snippet. Here my_spinner id the spinner variable and using getSelectedItem() which will return an object and by using toString()… Read More »

Working with SQLite Database in ANDROID.

By | February 14, 2011

Below is a straight forward example of how to deal with SQLite database in ANDROID. Go ahead and copy and paste the following code to your java file. The example has one database and performs functions like insert delete and listing of values in a textView. In the XML file set up a TableLayout with… Read More »

Access a remote database from Adobe AIR or FLEX.

By | February 8, 2011

Access a remote database from Adobe AIR or FLEX. Many often you need to access online database from your application. For doing it in Adobe AIR of FLEX you need HttpService. The following example shows how to access an online database from an AIR Application. Note that you cannot return an array from a remote… Read More »