Top android interview questions 2019
These are some probable question on android.you can refer these are as quick refresh knowledge about android and android development.
1.Who is the founder of Android?
Android Inc. was founded
in Palo Alto, California, in October 2003 by Andy Rubin, Rich
Miner, Nick Sears, and Chris White.
2.What is android?
Android is a mobile operating system developed by Google.
3. what are versions of android os?
·
Android 1.5: Android Cupcake.
·
Android 1.6: Android Donut.
·
Android 2.0: Android Eclair.
·
Android 2.2: Android Froyo.
·
Android 2.3: Android Gingerbread.
·
Android 3.0: Android Honeycomb.
·
Android 4.0: Android Ice Cream
Sandwich.
·
Android 4.1 to 4.3.1: Android
Jelly Bean.
4. What is the latest version of Android?
The Latest Version of
Android is 9.0, Pie.
5. What is API and SDK?
API is an interface that allows software
programs to interact with each other.
SDK is a set of tools that can be used to
develop software applications targeting a specific platform.
6. what is the full form of api in android?
Ans. application program
interface (API).
7. what is the full form of SDK in android?
Ans. software development kit.
8. what is emulator in android?
An Android emulator
is an Android Virtual Device (AVD) that represents a specific Android
device. You can use an Android emulator as a target platform to run and
test your Android applications on your PC.
9. what is activity in android studio?
An Android activity is one screen of the Android app's user interface. In that way an Android activity is very similar to windows in a desktop application.
An Android activity is one screen of the Android app's user interface. In that way an Android activity is very similar to windows in a desktop application.
10. what are different types of activity templates
in android studio?
Basic Activity, Bottom
Navigation Activity, Empty Activity, Fullscreen Activity, Login Activity,etc
11. What is activity life cycle?
When an activity
moves from being launched to being destroyed, it triggers key activity
lifecycle methods: the onCreate() and onDestroy() methods
12. what are views in android?
View is a basic building
block of UI (User Interface) in android. A view is a small rectangular
box which responds to user inputs. Eg: EditText , Button , CheckBox , etc.
13. Name some predefined views in android?
A partial list of
available widgets includes Button , TextView , EditText , ListView , CheckBox ,
RadioButton , Gallery , Spinner , and the more special-purpose
AutoCompleteTextView , ImageSwitcher , and TextSwitcher
14. What is layout?
In Android, an
XML-based layout is a file that defines the different widgets to be used
in the UI and the relations between those widgets and their containers.
15. What are types of layout?
- AbsoluteLayout
- FrameLayout
- LinearLayout
- RelativeLayout
- TableLayout
etc,
16. What is difference between Relative Layout and
Linear Layout?
LinearLayout : A layout that organizes its children into a single
horizontal or vertical row.
RelativeLayout is a view group that displays child views in relative
positions. Or in RelativeLayout area (such as aligned to the bottom,
left or center).
17.You want to change text
of button, what attribute of Button will you change in xml file?
android:text="@string/button_text"
18. What are different layout attributes?
android:id, layout_width, layout_height,
layout_marginTop, layout_gravity, layout_weight
19. What is onclick
listener?
Onclick handlers
are used to execute a part of code when a button or other part of the user
interface is touched (clicked).
20. What is meant by Services?
Service is an Android component which runs in the background and
acts independently. It does not provide any user interface.
21. What is the use
of AppCompatActivity?
The AppcompactActivity is a class which extends
FragmentActivity that is Base class for activities that use the support library
action bar features.
22. How to start an activity from within the
activity?
This can be achieved through
Intents. You can make Intents to link activities within your app as well as
call other apps.
23. What is Intent?
Android has an Intent class when the user has to navigate from one
Activity to another. Intent displays notifications from the device to the user
and then the user can respond to the notification if required.
24 Explain
Implicit and Explicit Intents.
Implicit Intent calls the system components while explicit Intents
invoke the Activity class.
25. What is Toast?
Andorid Toast can be used to display
information for the short period of time.
26. How do we create Toast?
Toast toast =
Toast.makeText(getApplicationContext(),
"This is a message displayed in a
Toast",
Toast.LENGTH_SHORT);
toast.show();
27. How do I get text
from EditText?
demo.getText();
28. How to we make a view interactive?
Drawing a UI is only one part of creating a custom view. You also
need to make your view respond to user input in a way that closely resembles
the real-world action you're mimicking. Users also sense subtle behavior or
feel in an interface, and react best to subtleties that mimic the real world.
29. How to add a event listener to a view?
An event listener is an interface in the View class that contains a single callback
method. These methods will be called by the Android framework when the View to
which the listener has been registered is triggered by user interaction with
the item in the UI.
30. What are different kinds of event
listeners?
onClick(),onLongClick(),onFocusChange(),onKey(),onTouch(),onCreateContextMenu
31. How do I add
permission to AndroidManifest?
· Step 1 : Go to app -> src -> main ->
AndroidManifest.xml.
· Copy following code: <uses-permission
android:name="android.permission.INTERNET" />
32. What is most widely used database for
Android app local storage?
SQLite
33. What is SQLite?
SQLite is a popular choice as embedded database
software for local/client storage in application software such as web
browsers.
34. What are advantages of using SQlite?
SQLite does have a
data constraints feature and can edit or drop tables without loading them into
memory. SQLite works on the data stored on the disk and is slower
compared to Core Data.
35. What are services?
Android service is
a component that is used to perform operations on the background such as
playing music, handle network transactions, interacting content providers etc.
36. When to use services?
If you want the service code to run in a
Background
37. You want to design a login screen what
layout will you use?
LinearLayout
38. What sensors are available in Android
Mobile?
·
Accelerometer. An accelerometer detects
acceleration, vibration, and tilt to determine movement and exact orientation
along the three axes. ...
·
Gyroscope. ...
·
Magnetometer. ...
·
GPS. ...
·
Proximity Sensor. ...
·
Ambient Light Sensor. ...
·
Microphone. ...
·
Touchscreen Sensors.
39. What are android permissions?
The purpose of a permission is to protect
the privacy of an Android user. Android apps must request permission
to access sensitive user data
40. Where do you write android permissions?
Manifest.xml
41. What are two permissions associated with
location in android?
ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION
42. How can we
retrieve anything from database?
using an object of the Cursor class.
43. What is .apk extension in Android?
It is a default file format that is used by Android Operating System. Application Package Kit (APK) is used
for installation of mobile apps. The .apk contains other code.
44. Tell some common Android APIs.
-
Databases are commonly used for caching data. So SQLite and Content
provider and Sync Adapter API are provided for Android.
- For
networking most developers use 3rd party libraries like Okhttp, retrofit,
volley.
No comments:
Post a Comment