New tutorials

Welcome to our Tutorials section! We are working hard to bring you high quality and interesting tutorials. Also check out the tutorials forum if you have any problems or want to make a request. Also, if the text in the code samples is too small, click here for an explanation.

  • How to optimize your android app's performance

    So here's how you can optimize, analyze your current application using TraceView.
    Open your Project, and after onCreate(), or anywhere you want to start Log tracing, paste the following lines:

    1. /* start tracing to "/sdcard/filename.trace" */
    2. Debug....

  • Mastering Android Widget Development - Part3

    I just come to a new discovery regarding widgets. I was developing an appwidget, which - just like the widgets we are trying to make in this series of tutorials - and tried it out multiple phones. Unfortunatelly on one of our test phones it didn't function properly. For random intervals it stopped to refresh, and it din't responded to button presses on the widget, only after 1-2 minutes. After hard work I discivered the following:

    Buttons on appwiget can have their onclick...

  • How to use custom designed numbers in your android widget

    If you don't want to download external fonts into your application, this article will be useful to you. You can draw your own numbers for example in gimp from 0 to 9. Copy thoose numbers in to your project folder's res/drawable subfolder. Each number is a new png (for example: one.png, two.png...). Then don't forget to refresh this directory in eclipse.

    In my last project I wrote an easy method, what I used to draw single numbers on a widget.

  • How to add external 3D fonts to your Android applications

    Step 1.
    First, go to, and find an eye-candy font, that you like the most. Look for „free 3d fonts”. I'm going to use this one:
    After you have downloaded it, unzip if it is zipped.

    Step 2.
    Go to your project's location, open the „assets” folder, and create a new folder called „...

  • Mastering Android Widget Development - Part2

    In Mastering Android Widget Development - Part1 we have gone trough the basics of appwidgets. Now we start to develop the example application, which couts time left to a given date.

    First implement the configuration activity. It will contain a DatePicker, an OK button and a Cancel button, defined in the configuration.xml layout:


  • How to configure widget-settings by clicking on widget developer tutorial

    Sometimes you need to change your widget settings after you put one to home screen. In my new tutorial I will show an easy way to solve this problem.

  • ProgressBar updating using Message Handler

    You're going to learn how to make a progressbar, which gives you a feedback what's going on in the background.

    Let say you have a LoadingScreen activity (loadingscreen.xml layout), and a Main activity (main.xml).

    You'd like to do some job in the Main activity, and update the progressbar status at the same time. To do this, we are going to use Messages. Although, you can update you're progressbar by sending the progressbar instance itself to your Main activity, but...

  • Mastering Android Widget Development - Part1

    In Days to Xmas tutorial you can see a simple widget example, which demonstrates what widgets are used for, and shows an example how they can work. Now I begin a series of tutorials to fully explain the working of widgets.
    We will also create a sample application, during the tutorials, which will show a countdown to a given date in secunds, but things that are not required for this specific example...

  • How to download file/image from url to your device

    We wrote a code for download image from a website to the phone. You can work with images (and files) in your applications, but this article may be useful for java developers too.

  • Debugging database

    When I first tried to manage an sqlite database on an android device I was not sure about where I fail in it. Can I even insert the records into the database, or I fail only to read the data from it? So I started to search for possibilities to debug the database lifecycle.

    The system stores databases in the /data/data/package_name/databases folder by default.

    In a command line using the adb (Android Debug Bridge - found in the android sdk tools library) you can access the...