Category: android

Tutorials about android applications development in Android Studio

Browse SQLite Database Data at Glance

Let’s make new button that will show all SQLite database data at glance in the toast. Then, add method in MySQLiteAdapter class: Good habit in accessing the data in SQLite database is to find column indexes first, and then to

Posted in android Tagged with:

Android See SQLite database content

Once we have created our database in android SQLite, we would like to see SQLite database content. For that purpose, we need to start our application in the emulator (virtual device). Then we need tool Android Device Monitor Choose your

Posted in android Tagged with: ,

Android SQLite Example

Android SQLite is Android database and it is very useful tool for local data storage. Later, stored data can be synchronized with other, larger database. When we deal with the databases, it is always useful to have additional class that

Posted in android Tagged with: ,

Android Dynamically Change Fragment

We have explained in previous tutorial how to add resource layout so that application is self-aware for smart device orientation change. Next step is to do the same thing but not with resource folder but dynamically. So android dynamically change

Posted in android Tagged with: ,

Android Adding Alternate Layout Resource Folder

Responsive design in android programming should have answer on mobile device orientation change from horizontal to vertical (portrait to landscape) and vice versa. In that sense, it is useful to know android adding alternate layout resource folder. So let’s start

Posted in android Tagged with: ,

Android Fragment Communication onSaveInstanceState

In this tutorial we cover android fragment communication onSaveInstanceState. Point is to save counted number in the fragment and reuse it again when mobile device is rotated. Starting from previous example, add in “Upper” fragment onSaveInstanceState method. Now, add more

Posted in android Tagged with:

Android Interface Class for Fragment Communication

Android Interface class is the best practice for fragment communication. If we want to make two fragments to communicate, we must put some effort to avoid coupling. If one fragment have reference to another, and call it directly, this situation

Posted in android Tagged with: ,

Android Inter Fragment Communication

In this tutorial android inter fragment communication is explained. Fragments in android are utilized to fully use screen area of the mobile device.  Our final target is to make an application that will have one fragment in the activity at

Posted in android Tagged with: ,

Android Scrollview Example

If you want to go beyond helloworld application, you need to learn to use Android Scrollview layout. In this tutorial we have Android scrollview example. Let’s start with new blank activity project. In the new blank activity project default layout

Posted in android Tagged with: ,

Android Orientation Changes

When user of Android mobile devices changes its orientation in some situations we need to handle Android orientation changes programmatically. So here is how to handle runtime changes. In your brand new application, make changes in your manifest first. app→manifests→AndroidManifest.xml

Posted in android Tagged with: ,

use FragmentManager class

The most appropriate way to handle Fragments in Android is to use FragmentManager class. Using fragments in Android programming is very useful advanced concept and benefits from it are: Dynamic and flexible user interface. Reusable views. Manage different screen resolutions.

Posted in android Tagged with: ,

Activity as Container for Fragments

Good practice in Android programming is to use Activity merely as a container and use Fragments for ALL UI elements, including the button you are clicking to change between them. For this purpose read as introduction.  Now, start new blank

Posted in android Tagged with: ,

Introduce fragment from activity in android

Concept of the fragment is new ‘quantum leap’ in Android programming. But before you start to run, you must learn how to walk first. So, we will start to introduce fragment from activity. We will remake our greatest common divisor

Posted in android Tagged with: ,

Volley git clone installation

You suppose to have started your Android studio project, and then, you need to do volley git clone installation. To do so, make an empty folder, go there and in cmd mode type following command: git clone https://android.googlesource.com/platform/frameworks/volley Then you

Posted in android Tagged with:

ListView with Images and Text

In this tutorial it is explained how to insert ListView with Images and Text in Android app. ListView with Images and Text is very handy user interface for Android app. First, let’s add ListView container in content_main.xml. So we have

Posted in android Tagged with: ,

FrameLayout in Android studio

FrameLayout in Android studio is an interesting layout option in Android studio. Mayor difference between frame layout on one side and Relative and Linear Layout on the other side is that FrameLayout allows widgets to flow one over another. With

Posted in android Tagged with: , ,

Usage of Android Studio Debugger

Before starting with new advanced topics in Android Studio, let’s learn usage of Android Studio debugger first. For example, if we want to add onClick method for some button, we can do it by open corresponding xml file (content_main.xml for

Posted in android Tagged with: , ,

Pass a String from one Activity to another in Android

This article is about how to pass a string from one activity to another in Android studio. This action doesn’t require any changes in layout or manifest. Code in the button in activity that send string is as follows: String

Posted in android Tagged with:

Android studio Get Google Maps street name

This article is continuation of previous first Google maps activity. In there, we were put pointer on the map in the position where given city is located. In here, we will obtain user current position, and in Android studio get

Posted in android Tagged with: ,

First Google Maps Activity

This article is about how to make your first Google maps activity, and inside it how to surround with try/catch some piece of code, how to handle permission exception, and how to add LinearLayout for fragment. Start new project in

Posted in android Tagged with: , , ,

Upgrade API level for developer in android studio

Upgrade API level for developer in android studio is very useful feature when you want to add new functionality to some older application. Fortunately, in modern Android studio (version 1.4 or higher) it is really simple.  Just do right click

Posted in android Tagged with:

Obtain Google api key maps

Before proceeding to make your first Android Studio Google maps application, you must obtain Google api key maps first. So, for Google Maps Android API, in Android studio, go to: Tools→Android→SDK Manager Then click on Launch Standalone SDK Manager See

Posted in android Tagged with:

Add Module in Android Studio

If we want to add module in android Studio, we need to do following steps: Click on File→new→New Module… Then choose “Android Library” Then choose minimum SDK for new module That’s it!

Posted in android Tagged with:

Use Camera in Android Studio

There are many in-built functionalities in Android mobile devices. In this tutorial it is explained how to use camera in android studio. Once one activity using camera is added to main project, go to main java project for this activity

Posted in android Tagged with: ,

Add a Second Activity using Intent in Android Studio

When you want to add a second activity in Android Studio, perhaps best way is to do it by using Intent class. Once when you made your first android app as single activity apk, next natural thing is that you

Posted in android Tagged with: ,

Add Picture to Android App

When you want to add picture to android app, you need to insert ImageView widget first. Now, prepare your picture in PNG format (recommended size should be inside dimension of 80X80 pixels). Then paste it into app→src→main→res→drawable. Note: your PNG

Posted in android

Publish Android App on Google Play

Your Android app is functional and ready. What to do next? You need to publish android app on Google play. So, click on your android building variants button. Then go to build variants and switch from debug to release. At

Posted in android

Add Link into Android App

Once when you made your initial application with AdMob in it you need to put some functionality to it. If we make application for calculation of greatest common divisor, we can put in app→res→layout→activity_main.xml (design view) some large text widgets,

Posted in android

Your First Android App with AdMob

If you start to develop your first android application in Android Studio or in any other programming tool, you would like to have some benefit from it. The best way to achieve this is to add Google AdMob into your

Posted in android

Initial Steps in Android Programming

Initial Steps in Android Programming are following: We need to install Java JDK first. Next step is to do android studio installation. But even on this early step, problems might appear, see the figure bellow. So we need to set

Posted in android