Android oparating system
- Get link
- X
- Other Apps
Android App Development Fundamentals for Beginners
Android is an operating system which is build basically for Mobile phones. It is based on the Linux Kernel and other open sources softwares and is developed by Google. It is used for touchscreen mobile devices such as smartphones and tablets. But nowadays these are used in Android Auto cars, TV, watches, camera,etc. It has been one of the best-selling OS for smartphones. Android OS was developed by Android Inc. which Google bought in 2005. Various applications (apps) like games, music player, camera, etc. are build for these smartphones for running on Android. Google Play store features more than 3.3 million apps. The app is developed on an application known as Android Studio. These executable apps are installed through a bundle or package called APK(Android Package Kit).
Android Fundamentals
- Android Programming Languages : In Android, basically programming is done in two languages JAVA or C++ and XML(Extension Markup Language). Nowadays KOTLIN is also preferred. The XML file deals with the design, presentation, layouts, blueprint,etc (as a front-end) while the JAVA or KOTLIN deals with working of buttons, variables, storing, etc (as a back-end).
- Android Components :The App components are the building blocks of Android. Each components have their own role and life-cycles i.e from launching of an app till the end. Some of these components depend upon other also. Each component have a definite purpose.
The four major app components are:
- Activities : It deals with the UI and the User interactions to the screen. In other words, it is a User Interface that contains activities. These can be one or more depending upon the App. It starts when the application is launched. Atleast one activity is always present which is known as MainActivity.
The activity is implemented through the following Syntax.
- Services : Services are the background actions performed by the app, these might be long running operations like a user playing music while surfing the Internet. A service might need another sub-services so as to perform a specific tasks. The main purpose of the Services is to provide non-stop working of the app without breaking any interaction with the user.Syntax:
Broadcast Receivers : A Broadcast is used to respond to the messages from other applications or from the System. For example, when the Battery of the phone is low, then the Android OS fires a Broadcasting message to launch Battery Saver function or app, after receiving the message the appropriate action is taken by the app. Broadcast Receiver is the subclass of Broadcast Receiver class and each object is represented by an Intent objects.
The above figure represents the various structure of an app.
- Android Mainfest is a XML file which is the root of the project source set. It describes the essential information about the app and the Android build tools, the Android Operating System and the Google Play. It contains the permission that an app might need in order to perform the specific task. It also contains the Hardware and the Software features of the app, which determines the compatibility of an app on Play Store. It also includes the special activities like services, broadcast receiver, content providers, package name,etc.
- The JAVA folder consist of the java files that are required to perform the background task of the app. It consist of the functionality of the buttons, calculation, storing, variables, toast(small popup message) , programming function, etc. The number of these files depends upon the type of activities created.
- Res or Resource folder consist of the various resources that are used in the app. This consist of sub-folders like drawable, layout, mipmap, raw and values. The drawable consist of the images. The layout consist of the XML files that defines the user interface layout. These are stored in res.layout and are accessed as R.layout class. The raw consist of the Resources files like audio file or music file,etc. These are accessed through R.raw.filename. values are used to store the hardcoded strings(considered safe to store string values) values, integers and colors. It consist of various other directories like:-
- R.array :arrays.xml for resource arrays
- R.integer : integers.xml for resource integers
- R.bool : bools.xml for resource boolean
- R.color :colors.xml for color values
- R.string : strings.xml for string values
- R.dimen : dimens.xml for dimension values
- R.style : styles.xml for styles
- Gradle: Gradle is an advance toolkit, which is used to manage the build process, that allows to define the flexible custom build configurations. Each build configuration can define its own set of code and resources, while reusing the parts common to all versions of your app. The Android plugin for Gradle works with the build toolkit to provide processes and configurable settings that are specific to building and testing Android applications. Gradle and the Android plugin run independent of Android Studio. This means that you can build your Android apps from within Android Studio. The flexibility of the Android build system enables you to perform custom build configurations without modifying your app’s core source files.
- Get link
- X
- Other Apps
Comments
Post a Comment