Pages

English Assignment 7

Senin, 11 Januari 2016

The Libraries

The libraries

Also the component libraries to share its space with the runtime component. The libraries component acts as a translation layer between the kernel and the application framework. The libraries are written in C / C ++ but are exposed to developers through a Java API. Developers can use the Java application framework to access the underlying core C / C ++ libraries. Some of the core libraries include the following:
            LibWebCore: Allows access to the web browtheser              
Media           Libraries: Allow access to popular audio - and video-recording and playback functions
            Graphic           libraries: Allows access to 2D and 3D graphics engines drawing
The runtime component Dalkviik Consist of the virtual machines that will Interact and run applications. The virtual machines is an important part of the android operating system and executes the system third-party applications.

The   Dalvik Virtual Machine
And Bornstein originally wrote the Dalvik virtual machine. He named it after a small fishing village   in Iceland where he Believed one   of his ancestors once Originated. The Dalvik VM was  written primarily to allow the application execution on devices with very limited resources. Typically, mobile phones will fall into this category Because they are limited by processing power, the amount of memory availabl, and a short battery life.

WHAT IS A VIRTUAL MACHINE?

A virtual machine is an isolated, the guest operating   system running another whitin the host operating system. A virtual machine will execute applications as if they were   running on a physical machine.   One of the main advantages of a virtual machine is portability. Regardless of the underlying hardware, the   code that you write will work on the VM. T o you as a developer, this means that you write your code only once and can execute it on any hardware platform that runs a compatible VM.
The Dalvik   VM executes. dex files. A. dex file made ​​by taking the compiled Java.class or.jar files and consolidating all the constants and the data within each.class files into a shared constant pool (see Figure 1-3). The dx tool, included in the Android SDK, performs this conversion.

Figure 1-3. Conversion of a.jar file to a.dex file



Table 1-1. A Comparison File Size (in Bytes) of .jar and .dex Files
Application
.jar Uncompressed
Compresses .jar

.dex Uncompressed

Common system
21445320 = 100%
10662048 = 50%
10311972 = 48%
Libraries



Web browser app
470 312 = 100%
232 065 = 49%
209 248 = 44%
Alarm clock app
119 200 = 100%
61 658 = 52%
53020 = 44%

The Application Framework
The application framework is one of the building blocks for the final or end-user system applicantions. Theframework Provides a suite of services or systems that   a developer will find useful when writing applications. Commonly Referred to as the API (application programming interface) component, this framework will provide a developer with access to user interface components such as buttons and text boxes, common content providers so that apps may share data between them, a notification manager so that the device owners can be alerted of events, and an activity manager for managing the lifecycle of applications.
As a developer, you will write code and use the APIs in the Java programming language. Listing 1-1, taken from Google's sample API demos(http://developer.android.com/resources/samples/ApiDemos/index.html), demonstates how to use the application framework to play a video file. The import statements in bold allow acces to the core C / C ++ libraries through a Java API.

Listing 1-1. A Video Player Demo (Courtesy of Google, Inc.)

/ *
* Copyright © 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may not use this file except in compliance with the license.
* You may Obtain a copy of the License at
*
* Htttp: //www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* Distributed under the licenses is distributed on an "AS IS" BASIS,
* WITHOUT warranties OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* Limitations under the License.
* /
Package com.example.android.apis.media;

importcom.example.android.apis.R;
importandroid.app.Activity;
importandroid.os.Bundle;
importandroid.widget.MediaController;
importandroid.widget.Toast;
importandroid.widget.VideoView;

Activity {public class VideoViewDemo

            / **
            * TODO: Set the path variable to a streaming video URL or a local media
            * File path.
            * /
ath private String = "";
privateVideoViewmVideoView;

override
public void onCreate (Bundle icicle) {
            super.onCreate (icile);
            setContentView (R.layout.videoview);
            mVideoView = (VideoView) findViewById (R.id.surface_view);

if (path == "") {
            // Tell the user to provide a media file URL / path.
Toast.makeText (
            VideoViewDemo.this,
            "Please edit VideoViewDemoAcivity, and set path"
                        + "Variable to your media file URL / path",
                        Toast.LENGTH_LONG) .show ();
} else {


























Library

Component library also shares space with the runtime component. Component library acts as a translation layer between the kernel and application framework. Library written in C / C ++  but developed through the Java API. Developers can use Java application framework for accessing basic core C / C ++ libraries. Some core libraries include:
LibWebCore: Allows access to the web browser
Media Library: Allows access to popular audio - and video recording-and function media player
Library graphic: Allows access to 2D and 3D machine graphic image
component runtime consists of a virtual machine Dalkviik will interact and run the application. Virtual machines are an important part of the android operating system and executing third-party applications systems. Dalvik Virtual Machine Dan Bornstein originally wrote the Dalvik virtual machine. He gave the name after a small fishing village in Iceland where he believes one of his ancestors originated. The Dalvik VM is written mainly to allow the execution of applications on devices with very limited resources. Normally, the phone would fall into this category because they are limited by the processing power, the amount of memory available, and short battery life.WHAT IS THE VIRTUAL MACHINE? A virtual machine is isolated, the operating system is running in another host operating system. A virtual machine will execute applications as if they were running on a physical machine. One major advantage is the portability of virtual machines. Regardless of the underlying hardware, the code you write will work on the VM. For you as a developer, this means that you write your code only once and can execute on the hardware platform running the VM compatible. The Dalvik VM executes. dex file. A. dex files created by taking Java.class or .jar file is compiled and consolidate all constants and data in each .class file to the constant pool together (see Figure 1-3). Dx devices, including the Android SDK, perform this conversion. After conversion, .dex file - the file has a smaller file size is very significant,




as shown in Table 1-1.
 
Table 1-1. A Comparison File Size (in Bytes) .jar file and Dex
Applications .jarDex compress compressed compressed .jar general system 21.44532 million = 100% 10,311,972 10,662,048 = 50% = 48% Library Web browser application = 100% 470 312 232 065 209 248 = 49% = 44 % Alarm clock app = 100% 119 200 52% 61 658 = 53020 = 44% Application Framework application framework is one block - the building blocks for the final system or application user - the final application. This framework provides a package of services or systems where developers will find a use when writing applications. Commonly referred to as a component API (application programming interface), the framework will provide developers with access to user interface components such as buttons and text boxes, content providers public so that applications can share data between them, the manager notices that the owner of the device can tell the events, and manager activities to manage the life cycle of applications. As a developer, you will write code and using the APIs in the Java programming language. Listing 1-1, demo samples taken from Google API (http://developer.android.com/resources/samples/ApiDemos/index.html), demonstates how to use an application framework to play video files. Import statements in bold allows access to the core of the C / C ++ libraries via a Java API. Listing 1-1. A Video Player Demo (Courtesy of Google, Inc.) / *  * Copyright © 2009 Android Open Source Project  *  * Licensed under the Apache License, Version 2.0 (the "License");  * You can not use this file except in compliance with the license.  * You can obtain a copy of the License at  *  * htttp: //www.apache.org/licenses/LICENSE-2.0  *  * Unless required by applicable law or agreed to in writing, software  * distributed under the License is distributed on an "AS IS",  * WITHOUT WARRANTY OR CONDITION OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * / Com.example.android.apis.media package; import com.example.android.apis.R ; import android.app.Activity; import android.os.Bundle; import android.widget.MediaController; import android.widget.Toast; import android.widget.VideoView; public class VideoViewDemo Activity {/ ** * TODO: Set the path variable URL to the video streaming or local media * Path file. * / private String ath = ""; private VideoView mVideoView; @ Override public void onCreate (Bundle es) {super.onCreate (icile); setContentView (R.layout.videoview); mVideoView = (VideoView) findViewById (R.id.surface_view); if (path == "") {// Tell the user to provide media files URL / path. Toast.makeText (VideoViewDemo.this, "Please edit VideoViewDemo Acivity, and set path 

+"Variables for your media files URL / path", 
Toast.LENGTH_LONG) .show
();} else {
Read more ...

English Assignment 6

Senin, 11 Januari 2016
English Version
7 OSI layers

Short for Open System InterconnectionOSI is a network model developed by ISO in 1978 where peer-to-peer communications are divided into seven layers.
The Seven Layers of OSI Model :

1 - Physical layer - responsible for the electrical, mechanical, and timing across the link.
This layer conveys the bit stream - electrical impulse, light or radio signal  through the network at the electrical and mechanical level.

2 - Data link layer (also known as the link layer) - responsible for transmitting data across a link.
At this layer, data packets are encoded and decoded into bits. It furnishes transmission protocol knowledge and management and handles errors in the physical layer, flow control and frame synchronization.

3 - Network layer - responsible for routing information through the network and allowing systems to communicate. This layer provides switching and routing technologies, creating logical paths, known as virtual circuits, for transmitting data from node to node.

4 - Transport layer - responsible for transferring information between endpoints on the network and deals with errors such as lost or duplicate packets. This layer provides transparent transfer of data between end systems, or hosts, and is responsible for end-to-end error recovery and flow control. It ensures complete data transfer.

5 - Session layer - responsible for managing a session between two applications.
This layer establishes, manages and terminates connections between applications.

6 - Presentation layer - responsible for the data formatting and display, allowing for compatibility.
This layer provides independence from differences in data representation (e.g., encryption) by translating from application to network format, and vice versa.

7 - Application layer - responsible for user interaction. An example of an OSI application is the FTAM.This layer supports application and end-user processes.


Translate Version 
7 Layar OSI

Singkatan dari Interkoneksi Sistem Terbuka, OSI adalah suatu model jaringan yang dikembangkan oleh ISO pada tahun 1978 di mana peer-to-peer komunikasi dibagi menjadi tujuh lapisan.
Tujuh Lapisan OSI Model:

1 – Lapisan Fisik - bertanggu
ng jawab untuk listrik, mekanik, dan waktu di lapisan link. Layer ini menyampaikan aliran bit - impuls listrik, cahaya atau sinyal radio - melalui jaringan di tingkat listrik dan mekanik.

2 - Lapisan Data Link (juga dikenal sebagai link layer) bertanggung jawab untuk transmisi data di link.At lapisan ini, paket data dikodekan dan diterjemahkan ke dalam bit. Ini dilengkapi pengetahuan protokol transmisi dan manajemen dan menangani kesalahan dalam lapisan fisik, kontrol aliran dan sinkronisasi frame.

3 - Lapisan Jaringan bertanggung jawab untuk routing informasi melalui jaringan dan memungkinkan sistem untuk berkomunikasi. Lapisan ini menyediakan switching dan routing yang teknologi, menciptakan jalur logis, yang dikenal sebagai sirkuit virtual, untuk transmisi data dari node ke node.

4 - Lapisan Transport bertanggung jawab untuk mentransfer informasi antara endpoint pada jaringan dan penawaran dengan kesalahan seperti hilang atau menggandakan paket. Lapisan ini menyediakan transfer transparan data antara sistem akhir, atau host, dan bertanggung jawab untuk pemulihan kesalahan end-to-end dan kontrol aliran. Ini memastikan transfer data lengkap.

5 - Lapisan Sesi bertanggung jawab untuk mengelola sesi antara dua aplikasi. Lapisan ini menetapkan, mengelola dan mengakhiri koneksi antara aplikasi.

6 - lapisan Presentasi - bertanggung jawab untuk format data dan display, memungkinkan untuk lapisan compatibility. Layer ini  memberikan kemerdekaan dari perbedaan dalam representasi data (misalnya enkripsi) dengan menerjemahkan dari aplikasi ke format jaringan, dan sebaliknya.

7 - lapisan Aplikasi - bertanggung jawab untuk interaksi pengguna. Contoh aplikasi OSI adalah lapisan FTAM.This mendukung aplikasi dan pengguna akhir proses.
Read more ...