Android Interview Questions and Answers for Freshers

  • By
  • January 21, 2020
  • Android
Android Interview Questions and Answers for Freshers

Android Interview Questions and Answers for Freshers

 

 1) What is Android?

Ans:  Android is an opensource Linux-based mobile operating system . which is designed to create an application for only touch screen devices. Android is not only designed to create Apps for the smartphone. which is used to create various types of applications for  SmartWatches, SmartTv, Smart Cars. Android Application runs in its own process. 

2) What is the main Component of Android?

Ans: The  main component  of android are –

  1. Services -> Used  for Performing Background Task
  2. Intent  -> Passing  Data from one Activity to another. Communicating between Activity.
  3. Resources ->String  and Graphs
  4. Notification ->Used  to send Notification in  the form of DialogBox, AlertBox, and Toast
  5. Content Providers->To share the Data Between Applications.

3) What are the Features of the Android OperatingSystem?

Ans: The main  features of  android operating System  are –

  1. Android is an Open-source. No need for Licensing. Distribution and development is Free.
  2. Platform Independent which   supports all Operating Systems Like Windows, Linux, Mac 
  3. It supports  various Technologies like Camera, Bluetooth, Wifi, Speech
  4. It uses a highly optimized virtual machine called DVM(Dalvik virtual machine).
  5. Android Training in Pune  guide you about Supports  languages Like Java, Kotlin, c++
  6. We can develop an App using Android Studio. 

4) What is the Core building Block of Android?

Ans: The Core building  Block of Android  are  Activity, View, Intent, Service, content providers, Fragment, Android Manifest file, AVD(Android virtual Machine)

5) What is the Role of AndroidManifest? XML File.

Ans: In the Android studio, every project should contain a Manifest file .which is stored in the root directory of the Android studio. It also defines the structure and metadata of Application. Android  Manifest file contains  Information About Activity, content Providers, Permission. Information About Packages, Broadcast Receiver.

For Free, Demo classes Call:8037516148
Registration Link: Click Here!

6) How many ManifestFiles in Android?

 Ans: We can have one or more Manifest.xml  files in the Android studio.

7) What is Activity in Android?

Ans: Activity is a Single Screen of your Smartphone. It represents a Single window or Screen.

8) Which is the Parent class of Android  Application?

Ans: The Application class is the Base of  All Android App. Which contains Activities and services. Its instance is created before any class when the process of Application is created.

9) What is the APK file?

Ans: Apk file is compressed with UI’s, Classes Assets, and manifest file. Apk file contains Applications information like Classes and Resources, services and Layout related information. Learn more at Android Course in Pune.

 

10) Describe Android Architecture?

Ans: Android is an open-source, Linux based software created for touch screen devices. The main foundation of Android is Linux Kernel. It provides  Android Run time (ART),  It also provides services like Threading and Low-Level memory management.
Hardware Abstraction Layer(HAL): It provides standard interfaces that expose device hardware to a higher-level java API  framework. HAL Consists of Library and Module for Camera, Bluetooth. Android System Loads Library Module for  hardware component.
Android  Runtime:  In android, each App runs in its own process that is its own ART.ART is written to  run multiple virtual machines on low memory devices by executing a DEX  file.
DEX :  IT is  a bycode format  specially designed   for Android.
Native C/C++  Library :  To Provide  System component and Service Some of Libraries  are written in c/c++.
Java API FrameWork: Android  building block   is JAVAAPI.

Some  of the Main Features  of JAVA API are:

  • View System:    The entire  UI we are designing in Layout using grid and textbox, etc are given by view System.
  • Resource Manager :  It Provides  Access to non-code data  like strings, graphics etc.
  • Notification Manager:  This enables to All Apps to display custom status bar and alert.
  • Activity  Manager: It  Controls Life Cycle  of Activity.
  • Content Providers:   For sharing data and one App can Access data of  Another App. For working with Local storage and Remote Storage we use Content Providers.
  • System APP:  Apart from JAVA  API. A developer can also Access Some of System App Like email, SMS, Contact, Default Keybord form System App.

Q11)   What is  viewGroup in Android?

Ans:   View Group  is a special view that  contain other views. View Group  is Base for All Layouts. All  Layouts Like Linear Layout, Relative Layout, Constrained Layout ,Table Layouts . Arranging of   Layout, size, Positioning is Available in viewGroup.

For Free, Demo classes Call:8037516148
Registration Link: Click Here!

Q12)  What   is Permission  in Android?

Ans: Every   App in android   runs on the limited-access  sandbox. If App requires  information beyond in its own  sandbox . then App needs permission. To declare the permission use App manifest file. To  Add Permission we declare <use-permission> element in manifest file.

Q13)  What   is Service?

Ans: Service is a Component that runs Background. Service doesn’t have any user interface. Since  Services runs Background user can continue his foreground task. Generally  user doesn’t know about service. To implement a service we need to extend our class from Service Class.

Q14)  Describe  Activity Life Cycle.

Ans: Activity    is a single screen. When user interacts  with Application . then he interacts with activity. When Activity is created  its Life Cycle is called. Life Cycle is managed by Activity Life Cycle Manager. There are states of  Activity like

  • On create()  : This   method is called when Activity is created. It is a Default  method 
  • On Start() :  When  activity  is started  . it enters in OnStart()  method.It makes activity visible to the user.App prepares for the activity to enter the foreground and becomes interactive to the end-user.
  • OnResume() : In this  state App interacts  with user.The app stays until something happens to take focus away from  App. For example receiving the phone calls, a user moving from one activity to another.
  •  OnPause():When  any interruptions occurs then  activity becomes paused which enters  in OnPause() method.
  •  OnStop() : When  Activity is no Longer    visible to User. It enters   in OnStop() method.

TO  implement    all these methods,   we need to override from Compact Activity  class.

Q15)   what is  Bundle in Android?

Ans: a Bundle is an object . It is used to pass data between Activities. The values are passed and Mapped to String keys. Which  are used to retrieve the values from Key.

Q16)  What   is Intent  in Android?

Ans: Intent   is a class   used to Navigate  from One Activity to  Another Activity. To Navigate from one Activity to Another we use the following Syntax.

The  following   are the Types   of Intent

  1. Implicit Intent : This  intent will Call any  web Page.
  2. explicit  Intent : This  Intent will Call  Activity In same App.

Syntax  of explicit  Intent

  Intent    obj = new Intent(MainActivity.this, NextActivity.class);

           startActivity(obj);  // this is example  of explicit Intent

Syntax  of implicit  Intent

Intent  obj = new Intent(Intent.Action_view);

Obj.setData(Uri.parse(“https://www.google.com”));

startActivity(obj);

Q17)  what are uses   of Intent

       Ans: Uses of Intent are  as follows  

  1. Intents    are used   for to startActivity
  2. Start service.
  3. Display webpage.
  4. Display  List of contacts
  5. Broadcast  the Message
  6. Dial  a Phone Call.

Q  18)  What   is R.java   File in Android?

Ans:  R.java    is an auto-generated file  by Android Asset Packaging Tool. R.java  contains resource id for all the resources of res/ directory. If you delete any R.java. Android will automatically create R.java.

  Q19)  What are   Fragments in  android?

Ans:  Fragment    is part of  activity . we can  even call fragment  as sub Activity. Using fragment we  can show multiple Activity on a single  screen.  Understand this concept from Android Classes in Pune.

Q20)  Which is the default database in Android Studio.

Ans:  SQLite is the default database in Android Studio.  Which is a serverless database.  Which is also known as the default database in android.

Q21)  what   are different  Dialog Boxes in  Android .

Ans:   Android   support four  types of Dialog Boxes  as fallows 

   Alert Dialog Box: It  display  alert dialog messages . Which we  can create using AlertDialog.Builder class

  Progress Dialog Box : this Dialog Box Appears when progress completes . example when download completes .

TimePickerDialog Box:  We can use  this dialogBox  to select Time.

 DatePickerDialog: we can use  this dialog box to select date.

Q22) What is SharedPreferences in Android?

Ans: In android Shared preferences are used to store and retrieve primitive information. In shared preferences, we store information in key and value formats. When we call key automatically value gets printed . The shared preferences concept is wildly used in user settings.
In order  to implement the shared preference, there is a method called 

getSharedPreferences()

getPreferences()

Q23) what   are the storage  Types in android 

Ans:  In Android, there are two types of  storage systems. Internal storage and external storage. Internal device  is smaller than an external device. Internal storage is already available on every device. For external we  need to extend the memory. 

For Free, Demo classes Call:8037516148
Registration Link: Click Here!

Q24)  Describe   File and Data Storage  

Ans: Android uses file System similar to disk-based file System.

 App-specific  storage: This type of storage is only used by App. So it is App-Specific storage.

Shared  Storage: this type of storage is for multimedia, files, and other documents.

Preferences: this  type of  storage for private primitive data  in key and value pair.

Databases:  In this storage, android will store a structured  database using Room Persistence Library.

The  limit  of internal storage is limited.

 

Author:
Bhagyashri Sangam | SevenMentor Pvt. Ltd.

 

Call the Trainer and Book your free demo class for Android Training now!!!

call icon

© Copyright 2020 | Sevenmentor Pvt Ltd.

 

One thought on “Android Interview Questions and Answers for Freshers

  1. DINESH SUBHASRAO SHOBHANE Reply

    so nice mam u given this information very easy language

Submit Comment

Your email address will not be published. Required fields are marked *

*
*