1. Tell us where will you declare your activity so the system can access it?

Activity is to be declared in the manifest file. For example:

☛ <manifest></manifest>
☛ <application></application>
☛ <activity android:name=”.MyIntellipaat”>

2. Tell me where can you define the icon for your Activity?

The icon for an Activity is defined in the manifest file.

Code
<activity android:icon="@drawable/app_icon" android:name=".MyTestActivity"></activity>
which means you have to Open AndroidManifest.xml.Right under the root “manifest” node of the XML, we can see the “application” node. We have added this attribute to “application”. (The “icon” in “@drawable/icon” refers to the file name of the icon.)
android:icon=”@drawable/icon”

3. Tell us how do you find any view element into your program?

Findviewbyid : Finds a view that was identified by the id attribute from the XML processed inActivity.OnCreate(Bundle).

Syntax

[Android.Runtime.Register("findViewById", "(I)Landroid/view/View;", "GetFindViewById_IHandler")]
public virtual View FindViewById (Int32 id)

4. How to perform actions that are provided by other application e.g. sending email?

Intents are created to define an action that we want to perform and launches the appropriate activity from another application.

Code

Intent intent = new Intent(Intent.ACTION_SEND);intent.putExtra(Intent.EXTRA_EMAIL, recipientArray);

startActivity(intent);

5. Tell me what is An Intent?

It is connected to either the external world of application or internal world of application, Such as, opening a pdf is an intent and connect to the web browser.etc.

6. Tell me what is a service in android?

The Service is like as an activity to do background functionalities without UI interaction.

7. Tell us what are the key components in android architecture?

☛ Linux Kernel
☛ Libraries
☛ Android Framework
☛ Android applications.

8. Tell me how is the use of web view in Android?

WebView is UI component that can display either remote web-pages or static HTML

9. Tell me how do you pass the data to sub-activities android?

Using with Bundle, we can pass the data to sub activities.

Bundle bun = new Bundle();

bun.putString("EMAIL", "contact@tutorials.com");

10. Tell me what is drawable folder in android?

A compiled visual resource that can used as a backgrounds,banners, icons,splash screen etc.

Download Interview PDF

11. Explain me why cannot you run standard Java bytecode on Android?

Android uses Dalvik Virtual Machine (DVM) which requires a special bytecode. First of all, we have to convert Java class files into Dalvik Executable files using an Android tool called “dx”. In normal circumstances, developers will not be using this tool directly and build tools will care for the generation of DVM compatible files.

12. Explain me what is the difference between an implicit intent and explicit intent?

There are two types of Intent implicit and explicit intent, let see some more difference between them.

Implicit: Implicit intent is when you call system default intent like send email, send SMS, dial number.

For example,

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);
sendIntent.setType("text/plain")
startactivity(sendIntent);

Explicit: Explicit intent when you call you're on application activity from one activity to another
For example, first activity to second activity:
Intent intent = new Intent(first.this, second.class);
startactivity(intent);

13. Please explain how can two Android applications share same Linux user ID and share same VM?

The applications must sign with the same certificate in order to share same Linux user ID and share same VM.

14. Tell me how will you pass data to sub-activities?

We can use Bundles to pass data to sub-activities. There are like HashMaps that and take trivial data types. These Bundles transport information from one Activity to another

Code

Bundle b=new Bundle();
b.putString(“Email”, “ggl@xyz.com”);
i.putExtras(b); //where I is intent

15. Tell me what is An android manifest file?

Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest file presents essential information about your app to the Android system, information the system must have before it can run any of the app's code.

16. Explain me what is ANR in android?

ANR stands for application is not responding, basically it is a dialog box that appears when the application is not responding.

17. Do you know what is container in android?

The container holds objects,
widgets,
labels,
fields,
icons,
buttons.
etc.

18. Explain me what is singleton class in android?

A class which can create only an object, that object can be share able to all other classes.

19. Tell me can Android application only be programmed in Java?

No, it is not necessary. You can program Android apps can be created using NDK in C/C++. The NDK is a toolset that allows you to implement parts of your app using native-code languages such as C and C++. Typically, good use cases for the NDK are CPU-intensive applications such as game engines, signal processing, and physics simulation.

20. Explain me what is Android?

Android is a stack of software for mobile devices which includes an Operating System, middleware and some key applications. The application executes within its own process and its own instance of Dalvik Virtual Machine.

21. Tell me what is an Adapter in android?

The Adapter is used to create child views to represent the parent view items.

22. Tell me what is the order of dialog-box in android?

☛ Positive
☛ Neutral
☛ Negative

23. Do you know how to launch an activity in android?

Using with intent, we can launch an activity.

Intent intent = new Intent(this, MyTestActivity.class);

startActivity(intent);

25. Please explain how does android track the application on process?

Android provides a Unique ID to all applications is called as Linux ID,this ID is used to track each application.