Deck 1 Flashcards

1
Q

1) What is Android?
// https://www.guru99.com/android-interview-questions.html

A

It is an open source linux-based operating system, that is used primarily on mobile devices, such as cell phones and tablets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

2) What Is the Google Android SDK?

A

The Google Android SDK is a toolset that developers need in order to write apps on Android enabled devices.

(or)

The Android SDK is a software development kit that includes a comprehensive set of development tools.

These include a debugger, libraries, a handset emulator based on QEMU, documentation, sample code, and tutorials.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

3) What is the Android Architecture?

A

Android Architecture is made up of 4 key components:-
1.Linux Kernel
2.Libraries
3.Applications Framework
4.Android Applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

4) Describe the Application Framework.
(Android architecture)

A

The Android Framework -Here you can find all the classes and methods that developers would need in order to write applications on the Android environment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

22) What is the importance of settings permissions in app development?

A

Permissions allow certain restrictions to be imposed primarily to protect data and code. Without these, codes could be compromised, resulting to defects in functionality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

20) Which elements can occur only once and must be present?

A

Among all elements the “manifest” and “application” and different elements, only the and elements are required.
They each must occur only once. Most of the other elements can occur zero or more times.
Wheras the rest of them are optional, and can occur as many times as needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

21) How are escape characters used as attribute?

A

Escape characters are preceded by double backslashes. For example, a newline character is created using ‘\n’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

12) What is the importance of XML-based layouts?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

13) What are containers?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

14) What is Orientation?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

15) What is the importance of Android in the mobile market?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

16) What do you think are some disadvantages of Android?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

17) What is adb?

A

Adb is short for Android Debug Bridge. It allows developers the power to execute remote shell commands. Its basic function is to allow and control communication towards and from the emulator port.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

18) What are the four essential states of an activity?

A

Active – if the activity is at the foreground
Paused – if the activity is at the background and still visible
Stopped – if the activity is not visible and therefore is hidden or obscured by another activity
Destroyed – when the activity process is killed or completed terminated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

19) What is ANR?

A

ANR is short for Application Not Responding. This is actually a dialog that appears to the user whenever an application have been unresponsive for a long period of time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

20) Which elements can occur only once and must be present?

A

Among the different elements, the and elements must be present and can occur only once. The rest are optional, and can occur as many times as needed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

21) How are escape characters used as attribute?

A

Escape characters are preceded by double backslashes. For example, a newline character is created using ‘\n’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

22) What is the importance of settings permissions in app development?

A

Permissions allow certain restrictions to be imposed primarily to protect data and code. Without these, codes could be compromised, resulting to defects in functionality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

23) What is the function of an intent filter?

A

Because every component needs to indicate which intents they can respond to, intent filters are used to filter out intents that these components are willing to receive. One or more intent filters are possible, depending on the services and activities that is going to make use of it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

24) Enumerate the three key loops when monitoring an activity

A

Entire lifetime – activity happens between onCreate and onDestroy
Visible lifetime – activity happens between onStart and onStop
Foreground lifetime – activity happens between onResume and onPause

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

25) When is the onStop() method invoked?

A

A call to onStop method happens when an activity is no longer visible to the user, either because another activity has taken over or if in front of that activity.

22
Q

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

A

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.

23
Q

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

A

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

24
Q

28) How can the ANR be prevented?

A

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.

25
Q

29) What role does Dalvik play in Android development?

A

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.

26
Q

30) What is the AndroidManifest.xml?

A

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.

27
Q

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

A

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.

28
Q

32) Enumerate the steps in creating a bounded service through AIDL.

A
  1. create the .aidl file, which defines the programming interface
  2. implement 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.
29
Q

33) What is the importance of Default Resources?

A

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.

30
Q

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

A

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.

31
Q

35) When does ANR occur?

A

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.

32
Q

36) What is AIDL?

A

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.

33
Q

37) What data types are supported by AIDL?

A

AIDL has support for the following data types:

-string
-charSequence
-List
-Map
-all native Java data types like int,long, char and Boolean

34
Q

38) What is a Fragment?

A

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

35
Q

39) What is a visible activity?

A

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.

36
Q

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

A

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 reach by a foreground activity, then it is killed so that the user interface can retain its responsiveness to the user.

37
Q

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

A

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.

38
Q

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

A

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.

39
Q

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

A

There are 5 key components under the Android application architecture:

  • services
  • intent
  • resource externalization
  • notifications
  • content providers
40
Q

44) What composes a typical Android application project?

A

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

41
Q

45) What is a Sticky Intent?

A

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.

42
Q

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

A

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.

43
Q

47) What is portable wi-fi hotspot?

A

Portable Wi-Fi Hotspot allows you to share your mobile internet connection to other wireless device. 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.

44
Q

48) What is an action?

A

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

45
Q

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

A

In general, a Nine-patch image allows resizing that can be used as 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 in 1 axis, and the middle one that can be scaled into both axes.

46
Q

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

A

The main language supported is 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.

47
Q

What is an activity in android?

A

A activity is single screen in an application with supporting java

48
Q

Under which of the following Android is licensed?

A

Apache/MIT

49
Q

For which of the following Android is mainly developed?

A

Mobile devices

50
Q

Which of the following is the first mobile phone released that ran the Android OS?

A

T - Mobile G1

51
Q

Which of the following virtual machine is used by the Android operating system?

A

Dalvik virtual machine -DVM