Android Camera API Tutorial

Android Camera :

Most Android phones today include inbuilt cameras — one at the front and one at the rear. This example shows you the way to programmatically invoke the camera to take an image and then save the image to external storage.In this Android tutorial you will learn how to use in-build android camera to take picture.

Android camera tutorial example

Solution Steps Android Camera :

In this example we will use Android camera api  (Existing android camera application api), which is use existing camera application installed on your phone.You are using an Intent object to invoke the camera, using the MediaStore.ACTION_IMAGE_CAPTURE action.

1. Create Android New project (Click here for setup new…

Read More . . .

Android Internal Storage: Read and Write text file example

Android Internal Storage :

In Android you can also save files (text file etc) directly on the device’s internal storage. By default,Saving and Loading Files to the internal storage are private to your application and different applications will not access them (nor can the user). once the user uninstalls this application, these files will automatically remove.

android read and write text file example

In Android data storage, It’s good practice to use Shared Preferences or a database to store your application data, but there are still times once you’ll need to use files directly rather than rely on Android’s managed mechanisms.

Sometime want to save data which have not be…

Read More . . .

Android Custom Listview with Image and Text using ArrayAdapter

Custom Listview with Image and Text :

The standard ListView only displays a list of items. while it may suffice when you simply need to show a list of text, it’s not enough for more refined applications. in this example, you’ll see how you’ll be able to customise the ListView so that you’ll be able to show pictures, multiple lines of text, and more.

custom listview image text

A. First Learn How to Display Image in ListView :

1. The first thing you’ll learn in this example is how to show a picture next…

Read More . . .

Android Gallery View – Displaying a List of Images

Android Gallery View :

In your application if you want display a series of images to the user, you can make use of the Gallery.The Gallery is a view that shows items (such as images) in a center-locked, horizontal scrolling list.

android Gallery View example 2

How to Create Android Gallery View:

  • Gallery is used to show Views in a horizontal list, and user will select a view , User selected view will be shown in center of the Horizontal list
  • The items of Gallery are get from an Adapter, just like ListView, in which ListView items are get from an Adapter.
  • We need to make an Adapter class that extends BaseAdapter class and override  getView() method.
  • getView() method known as…

    Read More . . .

Android Toast – Creating a Android Custom Toast

Toast in Android :

Toast is transient notifications that stay visible for less than a few seconds before fading out. Toast don’t take focus and its not a modal , so that they don’t interrupt the application.You can also use it for debugging purpose. A toast provides simple feedback about an operation in a small popup.

android-custom-toast-example

Toasts are excellent for informing your users of events without forcing them to open an Activity or browse a Notification. they provide a perfect mechanism for alerting users to events occurring in background Services without interrupting foreground applications. Generally, your application should show Toasts only if one of its Activities is active.

Creating Simple (Default) Android Toast :

The Toast…

Read More . . .