• Latest Code...

    Common android developer interview question and anwers

    Here is common interview asked during interview .

    What is Android?
    #  It is an open-sourced operating system that is used primarily on mobile devices, such as cell phones and tablets.
    It is a Linux kernel-based system that’s been equipped with rich components that allows developers to create and run apps that can perform both basic and advanced functions.

    Explain in brief about the important file and folder when you create new android application.

    # When you create android application the following folders are created in the package explorer in eclipse which are as follows:

    src: Contains the .java source files for your project. You write the code for your application in this file. This file is available under the package name for your project.

    gen —This folder contains the R.java file. It is compiler-generated file that references all the resources found in your project. You should not modify this file.

    Android 4.0 library: This folder contains android.jar file, which contains all the class libraries needed for an Android application.

    assets: This folder contains all the information about HTML file, text files, databases, etc.

    bin: It contains the .apk file (Android Package) that is generated by the ADT during the build process. An .apk file is the application binary file. It contains everything needed to run an Android application.

    res: This folder contains all the resource file that is used byandroid application. It contains subfolders as: drawable, menu, layout, and values etc.

    What is an Activity?
    # A single screen in an application, with supporting Java code.

    What is an Intent?
    # A class (Intent) which describes what a caller desires to do. The caller will send this intent to Android’s intent resolver, which finds the most suitable activity for the intent. E.g. opening a PDF document is an intent, and the Adobe Reader apps will be the perfect activity for that intent (class).

    What is the Android Architecture?
    #  Android Architecture is made up of 4 key components:
    - Linux Kernel
    - Libraries
    - Android Framework
    - Android Applications

    How do you handle multiple resolution screens in android?

    # The following five properties help you to achieve multiple resolution screens in android:

        Screen size – Screen sizes are divided into four generalized sizes: small, normal, large, and extra-large.
        Screen density – Screen densities are also divided into four generalized densities: low, medium, high, and extra-high.
        Orientation – When user rotates the device the orientation of the device also gets changed.
        Resolution – The total number of physical pixels on a screen.
        Density – independent pixel (dp) – Provides you a density-independent way to define your layouts.

    What is a resource?
    # A user defined JSON, XML, bitmap, or other file, injected into the application build process, which can later be loaded from code

     What is an Explicit Intent?
    - Explicit intent specifies the particular activity that should respond to the intent.
    - They are used for application internal messages.

     What is an Implicit Intent?
    - In case of Implicit Intent, an intent is just declared.
    - It is for the platform to find an activity that can respond to it.
    - Since the target component is not declared, it is used for activating components of other applications.

    What is the role of Orientation?

    # Orientation is used to determine the presentation of LinearLayout. It may be presented in rows or columns.

    What is adb?
    #  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.

    What is Dalvik Virtual Machine?
    - It is Android's virtual machine.
    - It is an interpreter-only virtual machine which executes files in Dalvik Executable (.dex) format. This format is optimized for efficient storage and memory-mappable execution.

    What are the different states wherein a process is based?
    #  There are 4 possible states:
    - foreground activity
    - visible activity
    - background activity
    - empty process

    What is the APK format?
    # The APK file is compressed AndroidManifest.xml file with extension .apk. It also includes the application code (.dex files), resource files, and other files which are compressed into a single .apk file.

    What is the 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.

    What is a Fragment?
    # 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.

    Describe Briefly the Android Application Architecture
    # Android Application Architecture has the following components:

        Services like Network Operation
        Intent – To perform inter-communication between activities or services
        Resource Externalization – such as strings and graphics
        Notification signaling users – light, sound, icon, notification, dialog etc.
        Content Providers – They share data between applications

    No comments:

    Post a Comment


    Most recent Elastic Search tutorials for beginner, intermediate and advance level developer, Yubraj Pokharel, in CodingWorkspace