How much Java is used in Android

Tutorial: Programming an Android app

Android operating system as the basis

Android is the operating system and software platform for mobile devices such as smartphones, tablets and netbooks. Android was developed by Google and first published in September 2008, the current version is Android 10 "Q". In Germany, Android has one 80.9% market share of mobile operating systems, in second place is Apple's iOS with 18.9%. Because Android is used by many smartphone manufacturers such as Huawei, Samsung, HTC and Xiaomi used as the operating system. This illustrates the huge Android market and the importance of being represented on this platform. Native apps developed for Android can be downloaded from the Google Play Store and used on any Android smartphone.

The technical basis on which Google's Android operating system is based is the Linux kernel. Native Android apps are the programs that run on this operating system and are included in the Programming language Java and Kotlin written. In addition, a software development kit (SDK) is required, in the case of Android this is Android Studio. A native application can use the various Android programming interfaces (APIs) directly, which creates a large number of functions and applications. Because a native app can access all hardware and software of the mobile end device, as well as the camera, GPS, files, microphone and the like. Since Google Android uses a different software platform than Apple iOS, it is not possible to install an Android app on an Apple device such as an iPhone. If an app is developed natively for Android, it must also be developed for Apple's iOS in order to be able to use it there.

Find out in the following article how you can program your own app.

Programming the Android app with Android Studio

Android Studio is a Open source programwhich, like Android, was published by Google. It is required to program native apps for Android. It represents the development environment (SDK) of an Android app and, as usual for open source software, is free of charge. Android Studio can be downloaded free of charge from the Internet; the latest version is Android Studio 3.6.1. In addition, additional software is required that Java Development Kit (JDK). This can also be downloaded free of charge from the Internet. The latest version is the Java SE Development Kit 14. For both programs you need a desktop PC, it doesn't matter which operating system, the software runs on Windows, macOS and Linux. Make sure that you download the latest versions of the programs for your platform. After installing the programs, you can start programming straight away. In a small tutorial we will show you how this works:

1. Create a new project

When programming an Android app, several individual files are created, which are combined in a project in Android Studio. To create a project, you have to start Android Studio and click the first button “Start a new Android Studio project”.

2. Project configuration

After creating a new developer project, you can then specify the name for your app project and determine where it will be saved. You also determine with which devices and Android versions your app will be compatible. Your app can be programmed for phone, tablet, smartwatch and TV. In the next step you define the project type of the app, in most cases this is the "Blank Activity" option.

3. User interface

After a short waiting period in which your app project is created, you will be taken to the project interface. On this, various files are listed in the left menu bar, which together represent your app project. The most important file is the "xml file", which contains essential information and must therefore be saved in every directory of a project. In the middle, the “palette” is shown as a virtual smartphone, in which, among other things, changes can be made to the text of your app. The smartphone display can be switched to any Android smartphone, so that you can review changes in real time on all devices. Another important tool is the layout editor, which can be used to design the user interface. By Drag and drop you can add various design elements to the app and thus design the appearance of your app. The required code is automatically written by the program so that you as the user do not write your own code yourself, which is typically understood as programming.

4. For advanced users: access to the code

The procedures mentioned above are very superficial and do not leave the programmer much freedom for individual functions and design. Simple Android apps are created this way. If your app requires more functions, you have to access the app's Java code directly and make changes there, which you can do. For this, however, certain programming skills are required, which you must first acquire. This takes a lot of time and requires technical know-how, which is why many entrepreneurs decide to have their native Android app programmed by an agency. Because these have many advantages, which you can read in our article "Have the app programmed - 4 reasons that speak for it".

5. Testing on your own smartphone

With Android Studio you can have the programming progress of your app displayed live on various devices in the software. But you can also test your app on your private smartphone at home, provided that you have an Android mobile phone. To do this, connect your smartphone to your computer via Bluetooth, USB-C or Micro-USB. You must also have the Android Debug Bridge (adb) installed on your Android device, which can be downloaded for free. You can then select your smartphone as the display device in Android Studio and start the test by clicking on the small play button to the right of the selection. Your app is now simulated live on the smartphone