Sunday, February 9, 2020

Basic Program

Building an Android Application is very easy, the programming language used by Android is java. Not all java features are used, but only a part of java is often called the Dalvik Virtual Machine (DVM). Some small parts of the Android framework use the XML language for scripting.
1. Activity. A container for the User Interface (UI). An Android Application is built from one or several Activities.

2. Intent. Is the main messaging system that runs Android. Intent consists of actions that must be executed (Show, Change, Dial, etc) and Data. Intent is used to start activities and communication between parts of the Android system. An application can send or receive intents.

》 Send messages with intent
When an application sends an intent, the application gives a message telling Android to run something, for example an Activity from the application or running another application.

》 Registering the Intent Receiver
Sending messages with an Intent doesn't mean that the next thing will happen automatically. The application must register an intent receiver that pays attention to the intent and tells Android what to do. For example, if a user long presses on an image in the image gallery, a context menu will appear related to image sharing. Because there are several receivers that are registered relating to image sharing (email, messaging, Bluetooth, etc). Then the context menu is raised to give decision options to the user.

3. Cursorless Controls. Android devices use the user's fingers as input. If you use a mouse pointer on a computer, then left-click to interact with a button, then Android users can use their fingers directly to the button. To replace the right-click, Android users can press their finger for a long time on the screen, then the context menu will appear.

4. Views and Widgets. View is a basic UI (User Interface) element. For example the area of ​​the box on the screen that is responsible for displaying and receiving events (event handling).
Some examples of Widgets: (1) Button, (2) CheckBox, (3) DatePicker, (4) DigitalClock, (5) Gallery, (6) FrameLayout, (7) ImageView, (8) RelativeLayout, (9) PopupWindow.

5. Asynchronous Calls. Android has a class called AsyncTask that allows applications to run several operations at the same time without having to set how the thread runs specifically. AsyncTask allows developers to build clean model programs for asynchronous processes. Asynchronous processes are used for processes that require a long time, such as Network Communication (Internet), Media Processing, and various other processes that require users to wait. If the user has to wait, then the asynchronous process can be used to display a UI that tells the user what happened.

6. Background Services. Services are applications that run in the background and don't really have a UI, for example antivirus. Most music players from the Android Market run as Background Services where users can listen to music while checking e-mail or perform other tasks that require the use of screen displays.

Read: https://knowledgefrans.blogspot.com/2020/02/basic-introduction-android-studio.html?m=1


No comments:

Post a Comment

ENGLISH PHRASES

YOUTUBE   ENGLISH PHRASES  no one said it was to be going easy.  tidak ada yang mengatakan itu akan berjalan mudah.  that wasn't the re...