Tampilkan postingan dengan label uri. Tampilkan semua postingan
Tampilkan postingan dengan label uri. Tampilkan semua postingan

Interview Question 21 - 30

Posted by Unknown Selasa, 11 Juni 2013 0 komentar

See more basics on Android along with interview questions

Explain about the Android Exceptions ?
The following are the exceptions that are supported by Android
InflateException :
        When an error conditions are occurred, this exception is thrown
Surface.OutOfResourceException:
        When a surface is not created or resized, this exception is thrown
SurfaceHolder.BadSurfaceTypeException:
         This exception is thrown from the lockCanvas() method, when invoked on a Surface whose is SURFACE_TYPE_PUSH_BUFFERS
WindowManager.BadTokenException:
         This exception is thrown at the time of trying to add view an invalid WindowManager.LayoutParamstoken.

What is Drawable?
A compiled visual resource that can be used as a background, title, or other part of the screen. It is compiled into an android.graphics.drawable subclass.

What is an Intent Receiver?
An application class that listens for messages broadcast by calling Context.broadcastIntent .

What is a Resource ?
A user-supplied XML, bitmap, or other file, entered into an application build process, which can later be loaded from code. Android can accept resources of many types; see Resources for a full description. Application-defined resources should be stored in the res/ subfolders.

What is a Theme ?
A set of properties (text size, background color, and so on) bundled together to define various default display settings. Android provides a few standard themes, listed in R.style (starting with “Theme_”).

What is an URIs?
Android uses URI strings both for requesting data (e.g., a list of contacts) and for requesting actions (e.g., opening a Web page in a browser). Both are valid URI strings, but have different values. All requests for data must start with the string “content://”. Action strings are valid URIs that can be handled appropriately by applications on the device; for example, a URI starting with “http://” will be handled by the browser.

Can you write code for Android using C/C++?
Yes, but need to use NDK
Android applications are written using the Java programming language. Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programminglanguage.
Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included “dx” tool.
Android only supports applications written using the Java programming language at this time.

What is an action?
A description of something that an Intent sender desires.

How is nine-patch image different from a regular bitmap?
It is a resizable bitmap resource that can be used for backgrounds or other images on the device. The NinePatch class permits drawing a bitmap in nine sections. The four corners are unscaled; the four edges are scaled in one axis, and the middle is scaled in both axes.

What languages does Android support for application development?
Android applications are written using the Java programming language.


Baca Selengkapnya ....

Intent and Intent Types-Explicit Intent & Implicit Intents

Posted by Unknown Senin, 13 Mei 2013 0 komentar
 See more basics on Android 

All the components are activated by a message called Intents. Intents bind individual components to each other at runtime, whether the component belongs to your application or another. An intent is created with an Intent object, which defines a message to activate either a specific component or a specific type of component—an intent can be either explicit or implicit, respectively.
An intent is an abstract description of an operation to be performed. Intents are send to the Android system via a method call, e.g. via the startActivity() method. They can be said as a message which allow android components to request functionality from other components.

Intent Filters:Activities and intent receivers include one or more filters in their manifest to describe what kinds of intents or message they can handle or want to receive.An intent filters lists a set of requirements, such as datatypes,action requested and URI format that the intent or message must fulfil.

Types Of Intents:
Implicit Intents :
Implicit Intents have not specified a component; instead, they must include enough information for the system to determine which of the available components is best to run for that intent.

Button browserview= (Button)findViewById(R.id.bview);
browserview.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent browserintent = new Intent(Intent.ACTION_VIEW, Uri.pars("http://www.http://eazyprogramming.blogspot.in/"));
startActivity(browserintent);
}
});
Explicit Intent:
Explicit Intents have specified a component, which provides the exact class to be run. Often these will not include any other information, simply being a way for an application to launch various internal activities it has as the user interacts with the application.

Button openclass= (Button)findViewById(R.id.bopenclass);
openclass.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Intent openintent = new Intent(FirstActivity.this,SecondActivity.class));
startActivity(openintent);
}
});

Baca Selengkapnya ....
Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android populer.