Android is an open supply cell platform launched by Google in 2008 and ever-since it turned the favorite for individuals and builders around the globe. Android is Linux based mostly multiprocess and multithreaded OS. Google’s Android OS will not be restricted to telephones however you need to use it to construct a DVR, a handheld GPS, an MP3 participant and many others.
Though Android platform is an open supply and customizable, Android customers and builders have develop into recurring to the constructs developed by Google for Android units. The usage of these Android ideas is important for growing an utility rapidly.
Key Ideas of Android are:-
Apps and APK Recordsdata
Views and ViewGroups
Structure XML Recordsdata
I’m providing you with an summary of the Android key ideas. After having a primary understanding of Android’s key ideas you possibly can go deeper into the assorted totally different matters.
Apps and APK Recordsdata
An Android app is an Android Software. An app is packaged in an APK file i.e. Android utility bundle. The APK file accommodates the compiled Java code and different assets like photos and texts for the Android utility
An Android exercise is a GUI element. You’ll be able to perceive it as a window in a desktop utility. As cell phone screens are small, an exercise takes up the entire display. Should you open a number of actions then they’re stacked on prime of one another. You can not organize actions facet by facet like you are able to do with desktop home windows.
Actions are distinctive, centered actions which a person can take. As it’s troublesome to scroll, zoom in or click on hyperlinks on a small display therefore it’s endorsed that an app show just one exercise per display. This can current probably the most related info to the person and permits them to launch a brand new display for added info or click on the again button to view the earlier exercise. The display can expose a number of duties however it ought to assist the person full only one exercise at a time.
In Android, a fraction is a fraction of a complete person interface. A fraction solely takes up a part of the display. Fragments are used within the actions. Fragments will also be used inside totally different actions. Fragments include Views and ViewGroups inside them.
View and ViewGroups
Android GUI components come into three classes i.e. Actions, Views and ViewGroups. Actions are the home windows/screens. Views are the person GUI components, like a TextView which shows a textual content, a Button that customers can click on on and many others. ViewGroups are containers for Views. A ViewGroup truly teams a group of Views collectively. Views and ViewGroups will be nested inside an exercise or inside even a fraction which is nested inside an exercise.
Structure XML Recordsdata
Actions, fragments and ViewGroups can use XML recordsdata to outline their format and contents. The format XML recordsdata inform which GUI elements an exercise or fragment accommodates and likewise the styling of the GUI elements i.e. The scale, margins, padding and many others.
In case your app requires performing a perform past its core capabilities like opening a photograph, taking part in a video or wanting up a contact then it is best to discover out whether or not a software that may carry out that perform already exists within the OS or in a third-party app. If sure then you may get the advantage of that performance utilizing intents.
For e.g. In case your app accesses person contacts then you need to use intent objects to launch the machine’s present Contacts utility. This removes the programming duplication and likewise pace up the person’s interplay with the machine because the person won’t must study once more methods to add a contact to your app.
Android Widgets are literally GUI elements which will be displayed outdoors of an exercise. For e.g. A climate widget which reveals as we speak’s climate is proven on many Android dwelling screens. Widgets have been packaged and applied as a part of an Android utility. Additionally typically Views in Android are additionally known as widgets. For e.g. Many GUI elements are positioned in a Java bundle referred to as android.widget. GUI elements should not identical as a widget which may stay on the house display of an Android machine. Therefore it is best to perceive the distinction between GUI elements which can be utilized inside ViewGroups, Fragments and elements which can be utilized inside ViewGroups, Fragments and Actions and likewise inside Widgets and Widgets which may stay on the house display of the Android machine.
In Android, Companies are background course of which will be executed on an Android machine even when no utility is seen. Companies don’t require a person interface. For e.g. A Service can verify a distant server for updates or backup knowledge each hour.
Android units have many inbuilt sensors which you’ll entry out of your Android purposes. For e.g the inbuilt GPS in smartphones is a sensor. Due to this fact you may get entry to the GPS from inside your Android purposes.