26) Is there a case wherein other qualifiers in multiple resources take precedence over locale?

Yes, there are actually instances wherein some qualifiers can take precedence over locale. There are two known exceptions, which are the MCC (mobile country code) and MNC (mobile network code) qualifiers.

27) What are the different states wherein a process is based?

There are 4 possible states:
– foreground activity
– visible activity
– background activity
– empty process

28) How can the ANR be prevented?

One technique that prevents the Android system from concluding a code that has been responsive for a long period of time is to create a child thread. Within the child thread, most of the actual workings of the codes can be placed, so that the main thread runs with minimal periods of unresponsive times.

29) What role does Dalvik play in Android development?

Dalvik serves as a virtual machine, and it is where every Android application runs. Through Dalvik, a device is able to execute multiple virtual machines efficiently through better memory management.

30) What is AndroidManifest.xml?

This file is essential in every application. It is declared in the root directory and contains information about the application that the Android system must know before the codes can be executed.

31) What is the proper way of setting up an Android-powered device for app development?

The following are steps to be followed prior to actual application development in an Android-powered device:
-Declare your application as “debuggable” in your Android Manifest.
-Turn on “USB Debugging” on your device.
-Set up your system to detect your device.

32) Enumerate the steps in creating a bounded service through AIDL.
  1. create the .aidl file, which defines the programming interface
  2. implements the interface, which involves extending the inner abstract Stub class as well as implanting its methods.
  3. expose the interface, which involves implementing the service to the clients.
33) What is the importance of Default Resources?

When default resources, which contain default strings and files, are not present, an error will occur and the app will not run. Resources are placed in specially named subdirectories under the project res/ directory.

34) When dealing with multiple resources, which one takes precedence?

Assuming that all of these multiple resources are able to match the configuration of a device, the ‘locale’ qualifier almost always takes the highest precedence over the others.

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

36) What is AIDL?

AIDL, or Android Interface Definition Language, handles the interface requirements between a client and a service so both can communicate at the same level through interprocess communication or IPC. This process involves breaking down objects into primitives that Android can understand. This part is required simply because a process cannot access the memory of the other process.

37) What data types are supported by AIDL?

AIDL has support for the following data types:
-string
-char sequence
-List
-Map
-all native Java data types like int, long, char, and Boolean

38) What is a Fragment?

A fragment is a part or portion of an activity. It is modular in the sense that you can move around or combine with other fragments in a single activity. Fragments are also reusable.

39) What is a visible activity?

A visible activity is one that sits behind a foreground dialog. It is actually visible to the user, but not necessarily being in the foreground itself.

40) When is the best time to kill a foreground activity?

The foreground activity, being the most important among the other states, is only killed or terminated as a last resort, especially if it is already consuming too much memory. When a memory paging state has been reached by a foreground activity, then it is killed so that the user interface can retain its responsiveness to the user.

41) Is it possible to use or add a fragment without using a user interface?

Yes, it is possible to do that, such as when you want to create a background behavior for a particular activity. You can do this by using add(Fragment, string) method to add a fragment from the activity.

42) How do you remove icons and widgets from the main screen of the Android device?

To remove an icon or shortcut, press and hold that icon. You then drag it downwards to the lower part of the screen where a remove button appears.

43) What are the core components under the Android application architecture?

There are 5 key components under the Android application architecture:
– services
– intent
– resource externalization
– notifications
– content providers

44) What composes a typical Android application project?

A project under Android development, upon compilation, becomes a .apk file. This apk file format is actually made up of the AndroidManifest.xml file, application code, resource files, and other related files.

45) What is a Sticky Intent?

A Sticky Intent is a broadcast from sendStickyBroadcast() method such that the intent floats around even after the broadcast, allowing others to collect data from it.

46) Do all mobile phones support the latest Android operating system?

Some Android-powered phone allows you to upgrade to the higher Android operating system version. However, not all upgrades would allow you to get the latest version. It depends largely on the capability and specs of the phone, whether it can support the newer features available under the latest Android version.

47) What is a portable wi-fi hotspot?

Portable Wi-Fi Hotspot allows you to share your mobile internet connection to other wireless devices. For example, using your Android-powered phone as a Wi-Fi Hotspot, you can use your laptop to connect to the Internet using that access point.

48) What is the action?

In Android development, an action is what the intent sender wants to do or is expected to get as a response. Most application functionality is based on the intended action.

49) What is the difference between a regular bitmap and a nine-patch image?

In general, a Nine-patch image allows resizing that can be used as a background or other image size requirements for the target device. The Nine-patch refers to the way you can resize the image: 4 corners that are unscaled, 4 edges that are scaled on 1 axis, and the middle one that can be scaled into both axes.

50) What language is supported by Android for application development?

The main language supported is the Java programming language. Java is the most popular language for app development, which makes it ideal even for new Android developers to quickly learn to create and deploy applications in the Android environment.

Android Interview Questions & Answers

The article was published on April 24, 2017 @ 1:08 AM

Leave a Comment

2 Comments

  • Hello, Neat post. There is a problem along with your website in internet explorer, would test this? IE still is the market chief and a good portion of people will pass over your great writing because of this problem.