Category: android

Tutorials about android applications development in Android Studio

Browse SQLite Database Data at Glance

Reading Time: 2 minutesLet’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

Tagged with:

Android See SQLite database content

Reading Time: 2 minutesOnce 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

Tagged with: ,

Android SQLite Example

Reading Time: 5 minutesAndroid 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

Tagged with: ,

Android Dynamically Change Fragment

Reading Time: 3 minutesWe 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

Tagged with: ,

Android Adding Alternate Layout Resource Folder

Reading Time: 3 minutesResponsive 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

Tagged with: ,

Android Fragment Communication onSaveInstanceState

Reading Time: 2 minutesIn 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

Tagged with:

Android Interface Class for Fragment Communication

Reading Time: 4 minutesAndroid 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

Tagged with: ,

Android Inter Fragment Communication

Reading Time: 3 minutesIn 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

Tagged with: ,

Android Scrollview Example

Reading Time: 2 minutesIf 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

Tagged with: ,

Android Orientation Changes

Reading Time: 3 minutesWhen 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

Tagged with: ,

use FragmentManager class

Reading Time: 3 minutesThe 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.

Tagged with: ,

Activity as Container for Fragments

Reading Time: 2 minutesGood 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

Tagged with: ,

Introduce fragment from activity in android

Reading Time: 3 minutesConcept 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

Tagged with: ,

Volley git clone installation

Reading Time: 2 minutesYou 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 Then you

Tagged with:

ListView with Images and Text

Reading Time: 5 minutesIn 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

Tagged with: ,

FrameLayout in Android studio

Reading Time: 2 minutesFrameLayout 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

Tagged with: , ,

Usage of Android Studio Debugger

Reading Time: 2 minutesBefore 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

Tagged with: , ,

Pass a String from one Activity to another in Android

Reading Time: 1 minuteThis 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

Tagged with:

Android studio Get Google Maps street name

Reading Time: 1 minuteThis 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

Tagged with: ,

First Google Maps Activity

Reading Time: 4 minutesThis 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

Tagged with: , , ,

Upgrade API level for developer in android studio

Reading Time: 1 minuteUpgrade 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

Tagged with:

Obtain Google api key maps

Reading Time: 2 minutesBefore 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

Tagged with:

Add Module in Android Studio

Reading Time: 1 minuteIf 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!

Tagged with:

Use Camera in Android Studio

Reading Time: 2 minutesThere 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

Tagged with: ,

Add a Second Activity using Intent in Android Studio

Reading Time: 3 minutesWhen 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

Tagged with: ,

Add Picture to Android App

Reading Time: 1 minuteWhen 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

Publish Android App on Google Play

Reading Time: 2 minutesYour 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

Add Link into Android App

Reading Time: 3 minutesOnce 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,

Your First Android App with AdMob

Reading Time: 3 minutesIf 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

Initial Steps in Android Programming

Reading Time: 3 minutesInitial 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