Tampilkan postingan dengan label activities. Tampilkan semua postingan
Tampilkan postingan dengan label activities. Tampilkan semua postingan

Interview Questions 31 -- 40

Posted by Unknown Selasa, 09 Juli 2013 0 komentar
What is the importance of having an emulator within the Android environment?
The emulator provides an interface that acts as if it were an actual mobile device. They can write and test codes, and even debug. Emulators are a safe place for testing codes especially if it is in the early design phase.

Differentiate Activities from Services.
Activities can be closed, or terminated anytime the user wishes. On the other hand, services are designed to run behind the scenes,
and can act independently. Most services run continuously, regardless of whether there are certain or no activities being executed.

What are containers?
Containers, as the name itself implies, holds objects and widgets together, depending on which specific items are needed and
in what particular arrangement that is wanted. Containers may hold labels, fields, buttons, or even child containers, as examples.

What is Orientation?
Orientation, which can be set using setOrientation(), dictates if the LinearLayout is represented as a row or as a column.
Values are set as either HORIZONTAL or VERTICAL.

What is the importance of Android in the mobile market?
Developers can write and register apps that will specifically run under the Android environment. This means that every mobile device that is Android enabled will be able to support and run these apps. With the growing popularity of Android mobile devices, developers can take advantage of this trend by creating and uploading their apps on the Android Market for distribution to anyone who wants to download it.

What do you think are some disadvantages of Android?
Given that Android is an open-source platform, and the fact that different Android operating systems have been released on different mobile devices, there’s no clear cut policy to how applications can adapt with various OS versions and upgrades. One app that runs on this particular version of Android OS may or may not run on another version. Another disadvantage is that since mobile devices such as  phones and tabs come in different sizes and forms, it poses a challenge for developers to create apps that can adjust correctly to the
right screen size and other varying features and specs.

How will you record a phone call in Android? How to get a handle on Audio Stream for a call in Android?
Permissions.PROCESS_OUTGOING_CALLS: Allows an application to monitor, modify, or abort outgoing calls.

How are escape characters used as attribute?
Escape characters are preceded by double backslashes. For example, a newline character is created using ‘\\n’

What are the different states wherein a process is based?
There are 4 possible states:
- foreground activity
- visible activity
- background activity
- empty process

When does ANR occur?
The ANR dialog is displayed to the user based on two possible conditions. One is when there is no response to an input event within
5 seconds, and the other is when a broadcast receiver is not done executing within 10 seconds.


Baca Selengkapnya ....

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 ....

Interview Questions 11 -- 20

Posted by Unknown Senin, 10 Juni 2013 0 komentar

See more basics on Android along with interview questions

Talk on Android OS ?
                 Android is a Linux-based operating system designed primarily for touchscreen mobile
devices such as smartphones and tablet computers. Initially developed by Android, Inc., which Google backed financially and later bought in 2005.Android is the world's most popular mobile platform.
Android is a Linux-based mobile phone operating system developed by Google. Android is
unique because Google is actively developing the platform but giving it away for free to
hardware manufacturers and phone carriers who want to use Android on their devices.

What is Android SDK ?
                A software development kit that enables developers to create applications for the Android
platform. The Android SDK includes sample projects with source code, development tools,
an emulator, and required libraries to build Android applications. Applications are written
using the Java programming language and run on Dalvik, a custom virtual machine designed for
embedded use which runs on top of a Linux kernel.

What items are important in every Android project?
               These are the essential items that are present each time an Android project is created:
- AndroidManifest.xml
- build.xml
- bin/
- src/
- res/
- assets/

What is AAPT ?
                AAPT is short for Android Asset Packaging Tool. This tool provides developers with the ability to deal with zip-compatible archives, which includes creating, extracting as well as viewing its contents.

What is the use of an activityCreator ?
                An activityCreator is the first step towards the creation of a new Android project. It is made up of a shell script that will be used to create new file system structure necessary for writing codes within the Android IDE.

What are Activities ?
               An activity represents a single screen with a user interface.Suppose if there is a listview and if clicking on each row it traverse to another page ,then the screen showing listview is an activity and the next page is another activity,where each one is independent of the others.
An activity is implemented as a subclass of Activity ,that why we use
public class MainActivity extends Activity {
}

What is services ?
              A service is a component that runs in the background to perform long-running operations or to perform work for remote processes. A service does not provide a user interface.For example : Running an alarm in background
A service is implemented as a subclass of Service.

What are Content Providers ?
             They manages a shared set of application data.Data can be stored in SQLite Database,File systems,web or any other medium where application can access.
Content Providers allows to modify and use these stored data.For example : storing users contacts details,where proper permission one can get the contacts.
A content provider is implemented as a subclass of ContentProvider.

What are Broadcast receivers ?
          They responds to systems  broadcast announcements.Some of the native Broadcast are volume control, light, switch on and off, screen on and off,bluetooth etc.A broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event. 
A broadcast receiver is implemented as a subclass of BroadcastReceiver.

What is the importance of XML-based layouts ?

The use of XML-based layouts provides a consistent and somewhat standard means of setting GUI definition format. In common practice, layout details are placed in XML files while other items are placed in source files.



Baca Selengkapnya ....

Interview Questions 1 -- 10

Posted by Unknown Rabu, 05 Juni 2013 0 komentar

See more basics on Android along with interview questions

What is definition of Android ?
               Android is a software stack for mobile devices that middleware, operating systems,
   and application-specific key. The application must be implemented in its own process
   and the Dalvik virtual machine interface. DVM is used effectively run multiple virtual
   machines. Java byte code is executed which is converted file format called Dex.

How the data will be stored in Android or types of data stored in Android ?
  •   Internal Storage
  •   Connecting to a network 
  •   General preferences 
  •   SQLite database
  •   External Storage
What are the components of Android Application ?
               Android is written in java programming language.Android application are composed of 
     some of the main components such as:
  •     Activities
  •     Services
  •     Content providers
  •     Broadcast receivers  
Explain each components of Android Application ?
  see this post

Explain life cycle of Android Appllication ?
              An activity is usually a single screen that the user sees on the device at one time. 
An application typically has multiple activities, and the user flips back and forth 
among them. As such, activities are the most visible part of your application.Activity 
Manager is responsible for creating, destroying, and managing activities. For example, 
when the user starts an application for the first time, the Activity Manager will create 
its activity and put it onto the screen. Later, when the user switches screens, the Activity 
Manager will move that previous activity to a holding place. This way, if the user wants to 
go back to an older activity, it can be started more quickly. Older activities that the user 
hasn’t used in a while will be destroyed in order to free more space for the currently active 
one. This mechanism is designed to help improve the speed of the user interface and thus 
improve the overall user experience.
see more :

What is an Android apk format?
              APK file is compressed AndroidManifest.xml file with the extension. Apk.
This android package file contains all of the files related to a single Android app.
This is the compressed collection of
  •     manifest file
  •     application code
  •     resource files
  •     and other files
What is an Intent ?
              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.
see more :
http://eazyprogramming.blogspot.in/2013/05/intent-and-intent-types-explicit-intent.html

What are types of Intent ?
               Explicit and Implicit Intents
see more :
http://eazyprogramming.blogspot.in/2013/05/intent-and-intent-types-explicit-intent.html

What are 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. 

Explain Android Architecture?
see more : 


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 ....

Android Application Fundamentals or Components

Posted by Unknown Senin, 06 Mei 2013 0 komentar

See more basics on Android along with interview questions

Android is written in java programming language.Android application are composed of some of the main components such as:
  • Activities
  • Services
  • Content providers
  • Broadcast receivers
Intents, Resources(such as strings and graphics), Notification signalings(light,sound,dialog), are also part of the components.

All these components play different role in the overall application and each one can be activated individually.

Activities :
          An activity represents a single screen with a user interface.Suppose if there is a listview and if clicking on each row it traverse to another page ,then the screen showing listview is an activity and the next page is another activity,where each one is independent of the others.
An activity is implemented as a subclass of Activity ,that why we use

see activity life cycle here :

public class MainActivity extends Activity {
}
Services :
          A service is a component that runs in the background to perform long-running operations or to perform work for remote processes. A service does not provide a user interface.For example : Running an alarm in background
A service is implemented as a subclass of Service.

Content providers :
          They manages a shared set of application data.Data can be stored in SQLite Database,File systems,web or any other medium where application can access.
Content Providers allows to modify and use these stored data.For example : storing users contacts details,where proper permission one can get the contacts.
A content provider is implemented as a subclass of ContentProvider.

Broadcast receivers :
          They responds to systems  broadcast announcements.Some of the native Broadcast are volume control, light, switch on and off, screen on and off,bluetooth etc.A broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.
A broadcast receiver is implemented as a subclass of BroadcastReceiver.

Who Activates A component ?
         The above 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.

What is a Content Resolver ?
         The Content Provider, is not activated by intents. It is activated when there is request from ContentResolver. These Resolvers handles direct transaction with the providers so they donot need further any method calls. This leaves a layer of abstraction between the content provider and the component requesting information (for security).

What is an AndroidManifest file ?
          This is a root directory of Android application where all the components are declared.Other than this they also have
  • user permissions the application requires, such as read and write external storage
  • Declare the minimum API level
  • Declare hardware and software features such as bluetooth or a printer
  • API libraries etc...
 




Baca Selengkapnya ....

How To Finish All Previous Activities in ANDROID ?

Posted by Unknown Rabu, 03 April 2013 0 komentar
Some times we may need to close previous all activities before calling an intent, so that the previous activity do not loads on clicking the Android back button.Here is a simple sniffet for it..


Intent intent = new Intent(getApplicationContext(), MainClass.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);


Baca Selengkapnya ....

EditText With Long Default Text On A single Line in ANDROID

Posted by Unknown Selasa, 02 April 2013 0 komentar
Sometimes we may need to include a long default text on a single line in EditText, for that we can set the EditText to single line and provide a horizontal scroll.
 <EditText
android:id="@+id/EditTextValue"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:singleLine="true"
android:scrollHorizontally="true"
android:text="This is a big text to be included in the edittext so added a horizontal scroll..."/ >

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