Android operating system has been built using Unix and Java. As a developer, you need to be aware of various services, UI components and tips to get started with android application development. The following tutorials shall help you gain more knowledge of Android development.
For Android development, you need to test your application code on a device. The emulator can help to check the application quickly using Eclipse IDE.
Android Hello World application tutorial with example
Create your first android project using Eclipse IDE, Android SDK and Eclipse ADT Plugin. Run the hello world application in android emulator and your phone.
Android Activity example, How activity works in android application
How to create a new activity. Difference between Mainactivity and other activity and how to invoke one activity from another activity in Android application.
Publishing application on Google Play store
How to publish your android application on Google play store. Steps for publishing app on any Android open store like Amazon, SlideMe and getJar etc.
Android app development using android annotations
The android sdk doesn’t support annotations for faster development. A fellow developer has written a library to make the development faster by using annotations. This library project is must have for big apps.
By default user interface blocks in Android applications but there are ways which can be used to improve user experience by making it non-blocking.
Android ImageSwitcher example
How to use ImageSwitcher control to show multiple images and add animation when user swipes on the screen. Sample code for ImageSwitcher control has been added.
Android Button, Image Button example
Add Buttons and ImageButton in Android layout using XML editor or by using the Java code. Android is so flexible.
Android SeekBar Example and References
Adding SeekBar in your android application is easy. Simply add SeekBar control in the layout xml, add corresponding Java code and done.
Displaying toast messages in Android application
Display a Toast message to the user telling about specific action to be taken or specific information. We can control various attributes of Toast message.
Android launch youtube videos in application
Playing YouTube videos from ListView or Button in Android application is possible by using the YoutubePlayerActivity class. You need the developer key from YouTube.
Android spinner example
Add a spinner control to Android layout xml and add items to this spinner by using an array defined in strings.xml and also programatically using java code.
Android textbox, edittext and textarea example
How to use textbox, edit text box and text area in your application.
Using edittext to accept password input
Many a times you need to accept password input from the user which can be done by using the EditText widget.
Android checkbox example
The checkbox can be used to ask user to select the options he wants to be enabled/disabled. It is very easy to listen to checkbox events too.
Android radio group example tutorial
A radio group is a group of radio buttons where only one radio button can be selected at a time.
Android spinner (drop down list) example
Adding drop down list box in android application and allowing the user to make a choice.
Android date picker example
Use the date picker widget control to allow user to select any date and use the selected value in your application.
Android Time Picker Example
Use the time picker widget control to allow user to select any time and use the selected value in your application. There is option to use 12hour or 24hour format.
Progress Bar for WebView in Android
Depending upon the internet speed of a user, it can take some time to load HTML pages in the webview. It is a good practice to show a loading progress bar in such cases.
Digital clock and Analog clock in Android
A digital or analog clock in the android application can be used to show time to the user.
How to create a dynamically growing ListView in Android
Add items to listview dynamically whenever the user wants it.
How to show popup menu onclick of GridView items
There is in-built support for PopupMenu in android API. Here we attach the popup menu to gridview items.
How to create an image gallery in Android application
The gallery widget in android allows for creating a gallery where thumbnails of the images are shown. The currently selected image in the gallery is shown as full image.
Android WebView Example
We can use the WebView control to show local html page, string object containing html or show a html page from internet. We can also either show the html inside webview or open the android web browser with the html content.
Opening image in ImageView from URL
Use ImageView to show images which are downloaded from the internet.
How to create custom view for Alert Dialog in Android
Show an Alert dialog to users with contents loaded from custom layout file.
Android UI controls fitting on the screen with the help of layout_width and layout_height attributes of the controls which have three values.
Android TextSwitcher Example
How to use TextSwitcher control to move between different textviews in android application. Attaching animation is also possible with TextSwitcher.
Android TabLayout example by using TabHost
TabLayout is used to show multiple tabs to the user. It is useful when you want to categorize content. Many Android apps are using it.
Centre button position in layout xml
Use the attributes described in this tutorial to make the button attain centre position in a layout
Android ViewPager example tutorial
The viewpager control allows for Play store style browsing using horizontal finger swipe.
Tips and Tricks
Flash is not supported by Android out of the box. But there are ways through which we can still use Flash in Android devices.
Attach android source code in eclipse
3 ways to attach download the Android source code but only one way to attach the downloaded source code in Eclipse IDE.
HAX is not working and emulator runs in emulation mode
HAX issues are very common when running the Android emulator with CPU as Intel. We should set CPU as ARM(armeabi-v7a)
Android invoking appropriate keyboard style
How to display the specific type of keyboard when the user clicks on a EditText control. The code includes setting attribute in Android layout XML.
Android secrets for app developers
If you are developing an app then you need to take care of lot of things including publishing the app, ranking on play store and retaining users. Use the secrets in this tutorial to get that extra edge.
How to display user location on Google maps in Android
Use the google maps API to show the current user location by using the latitude and longitude information.
Code to stop android device from going to sleep
We can make the android device to not go to sleep by making some changes to the code. Good for ebook reading and video viewing apps.
Show hide buttons on Activity screen from Action Bar in android
We can attach event handler to action bar buttons so as to allow chaning the visibility of button on the activity screen.
How to change android volume using SeekBar code
An application can also allow the user to change the device volume by using seekbar. Only the volume needs to be tied to the current progress of seekbar.
Monetizing your android apps
There are a lot of ways by which the android apps can be monetized as shared in this tutorial.
How to record user voice in Android application
By using the Audio Manager API of android, we can record user’s voice inside an android application.
How to localize the android app for international users
Android has great support for i18n. You just need to have appropriate resources in-place, the rest of the job is done by the operating system.
How to listen for incoming calls in Android
The call manager API of android OS allows to take some action as soon as a new call arives to the operating system.
How to add home widget feature in android app
Widgets sit on the home screen of the android device. Use this tutorial to add a related widget to the home screen of android device.
Going to previous activity by using action bar icon in Android
The android action bar API allows the user to go back to previous activity by using the app icon displayed on the left side of action bar. The corresponding code can be found here.
How to set alarm in android application with code example
The Alarm manager API allsows the application to schedule alarms in the future.
Android splash screen example
When loading resources (like reading files, downloading images), it is a good practice to show a splash screen to the user.
Sharing data among activities in Android
By using the SharedPrefrences object in android application, we can easily share data among various activities in Android app.
How to show context menu for ListView items
In this tutorial, we show a context menu when user long presses the items in ListView
Invoke another application in android using code
Any android application can invoke other application by using the appropriate Intent. Moreover, information can be exchanged between applications.
ListView section based fast scroll in Android
ListView widget control allows the user to fast scroll and easily locate the item he is looking for.
How does google play store ranking work
Decrypting search algorithms is always a tough job. But by following some of the best tips, developers can increase the visibility of their android apps.
How to animate TextView in Android
When new text is being shown to the user inside a textview, it is good to have some animation effect so that slid in from left/right/up and down makes up for really good user experience.
How to listen orinetation change in Android app
If the user has allowed rotation in screen orientation then the application screen shall also rotate but the app may look weird if the portrait layout is shown in landscape mode too. The best thing you can do is to tweak the UI as soon as screen orientation changes.
Code to get sensors list in Android
Different android devices come with different kind of sensors. See the code listing here to get sensors list dynamically in Java.
How to check if this is the first run for the android app by user
When the user launches the app for first time, we can show a alert, toast or overlay as a help message. See the code on how to detect if the app has been launched for first time or ntw.
Android developers looking to dig deeper into the working and coding aspects of the ecosystem should read these suggested android books.
Before August’13, many of the developers on play store were using push and icon ads to generate revenue from the apps. But these were seen as intrusive ads by users and hence have been banned by Google. Do read the complete story.