Android

{"iq":[{"id":"1",
    "q":"What is Android?",
    "answer":"Android is a Software for mobile devices which includes an Operating System, middleware and some key applications.\n\nThe application executes within its own process and its own instance of Dalvik Virtual Machine.\n\nMany Virtual Machines run efficiently on a DVM device.\n\nDVM executes Java languages bytecode which later transforms into .dex format files."
  },
    {"id":"2",
      "q":"What are the different data types used by Android? ",
      "answer":"The data can be passed between many services and activities using the following data types:\n\n– Primitive Data Types: This is used to share the activities and services of an application by using the command as Intent.putExtras().\n\nThis primitive data passes the command to show the persistent data using the storage mechanism.\n\nThese are inbuilt data types that are used with the program.\n\nThey provide a simple implementation of the type and easy to use commands.\n\n– Non-Persistent Objects: It is used to share complex and non-persistent objects.\n\nThese are user-defined data types that are used for short duration and are also recommended to be used.\n\nThese types of objects allow the data to be unique but it creates a complex system and increases the delay. "
    },
    {"id":"3",
      "q":"What Is the Google Android SDK?",
      "answer":"The Google Android SDK is a toolset that developers need in order to write apps on Android enabled devices.\n\nIt contains a graphical interface that emulates an Android driven handheld environment, allowing them to test and debug their codes."
    },

    {"id":"4",
      "q":"What is AAPT?",
      "answer":"AAPT is short for Android Asset Packaging Tool. This tool provides developers with the ability to deal with zip-compatible archives, which includes creating, extracting as well as viewing its contents."
    },
    {"id":"5",
      "q":"What main components of Android application?",
      "answer":"Activities: They dictate the UI and handle the user interaction to the screen.\n\nServices: They handle background processing associated with an application.\n\nBroadcast Receivers: It handles the communication between Applications and Android Operating system\n\nContent Providers: They handle data and database management stuff."
    },
    {"id":"6",
      "q":"Where will you declare your activity so the system can access it?",
      "answer":"Activity is to be declared in the manifest file. For example:\n\n<manifest> </manifest>\n\n<application> </application>\n\n<activity android:name=”.MyTestActivity”> </activity>  "
    },

    {"id":"7",
      "q":"What is the difference between a regular .png and a nine-patch image?",
      "answer":"It is a resizable bitmap resource that can be used for backgrounds or other images on the device. NinePatch class permits drawing a bitmap in nine sections. The nine patch images have extension as.9.png. It allows extension in 9 ways, i.e. 4 corners that are unscaled, 4 edges that are scaled in 1 axis, and the middle one that can be scaled into both axes."
    },

    {"id":"8",
      "q":"What are the different storage methods in Android?",
      "answer":"Android offers several different options for data persistence. Shared Preferences – Store private primitive data in key-value pairs. This sometimes gets limited as it offers only key-value pairs. You cannot save your own java types. Internal Storage – Store private data on the device memory."
    },
    {"id":"9",
      "q":"What is action in Android?",

      "answer":"In Android, the action is a description of something that an intent sender desires.\n\nSYNTAX:\n\nCONTAINED IN:\n\nDESCRIPTION:\n\nAdds an action to an intent filter. An element must contain one or more elements. If it doesn’t contain any, no Intent objects will get through the filter."
    },

    {"id":"10",
      "q":"What is an ANR notification in Android?",
      "answer":"ANR is short for Application Not Responding.\n\nAndroid systems show this dialog if the application is performing too much of task on the main thread and has been unresponsive from a long time."
    },

    {"id":"11",
      "q":"Enumerate three key loops when monitoring an activity?",

      "answer":"• Entire lifetime – activity happens between onCreate and onDestroy\n\n• Visible lifetime – activity happens between onStart and onStop\n\n• Foreground lifetime – activity happens between onResume and onPause"
    },

    {"id":"12",
      "q":"What is the APK format?",
      "answer":"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."
    },
    {"id":"13",
      "q":"How to Translate in Android?",
      "answer":"The Google translator translates the data of one language into another language by using XMPP to transmit data. You can type the message in English and select the language which is understood by the citizens of the country in order to reach the message to the citizens."
    },

    {"id":"14",
      "q":"What do you mean by storage classes?",
      "answer":"Storage class are used to specify the visibility/scope and life time of symbols(functions and variables).\n\nThat means, storage classes specify where alla variable or function can be accessed and till what time those variables will be available during the execution of program."
    },

    {"id":"15",
      "q":"What is Activities?",
      "answer":"Activity is a single, focused thing that the user can do.When ever user click on GUI the next Activity will be start and new GUI set base on coding."
    },

    {"id":"16",
      "q":"What language you should know to develop android application?",
      "answer":"Java\n\nXML"
    },

    {"id":"17",
      "q":"What are Advantages of android?",
      "answer":"Open-source\n\nPlatform-independent "
    },
    {"id":"18",
      "q":"What is full form of ANR? ",
      "answer":"Application Not Responding"
    },

    {"id":"19",
      "q":"What is the use of an activityCreator?",
      "answer":"An activityCreator is the first step towards the creation of a new Android project. It is made up of a shell script that will be used to create new file system structure necessary for writing codes within the Android IDE."
    },

    {"id":"20",
      "q":" Differentiate Activities from Services.",
      "answer":"Activities can be closed, or terminated anytime the user wishes. On the other hand, services are designed to run behind the scenes, and can act independently. Most services run continuously, regardless of whether there are certain or no activities being executed."
    },
    {"id":"21",
      "q":"What are containers?",
      "answer":"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. "
    },
    {"id":"22",
      "q":" What is Orientation?",
      "answer":"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. "
    },

    {"id":"23",
      "q":"How do you find any view element into your program?",
      "answer":"Findviewbyid : Finds a view that was identified by the id attribute from the XML processed inActivity.OnCreate(Bundle).\n\nSyntax\n\n[Android.Runtime.Register(\"findViewById\", \"(I)Landroid/view/View;\", \"GetFindViewById_IHandler\")]\n\npublic virtual View FindViewById (Int32 id)"
    },{"id":"24",
      "q":"Which dialog boxes can you use in your Android application?",
      "answer":"Rendering is a process of converting complete server side code into client understable code. It will happen before page is submitting to the client."
    },{"id":"25",
      "q":" What is the type of “this” pointer? When does it get created?  ",
      "answer":"AlertDialog : An alert dialogue box supports 0 to 3 buttons and a list of selectable elements.\n\nProgressDialog : An extension to AlertDialog and you may add buttons to it. It shows a progress wheel or a progress bar.\n\nDatePickerDialog : It is used for selecting a date by the user.\n\nTimePickerDialog : It is used for selecting time by the user."
    },{"id":"26",
      "q":" Can you deploy executable JARs on Android? Which packaging is supported by Android?",
      "answer":"No, Android platform does not support JAR deployments. Applications are packed into Android Package (.apk) using Android Asset Packaging Tool (AAPT) and then deployed onto Android platform. Google provides Android Development Tools for Eclipse that can be used to generate Android Package."
    },{"id":"27",
      "q":"How can ANR be prevented?",
      "answer":"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 tasks of the codes can be placed, so that the main thread runs with minimal periods of unresponsive time."
    },{"id":"28",
      "q":"How will you pass data to sub-activities? ",
      "answer":"We can use Bundles to pass data to sub-activities. There are like HashMaps that and take trivial data types. These Bundles transport information from one Activity to another\n\nCode\n\nBundle b=new Bundle();\n\nb.putString(“Email”, “abc@xyz.com”);\n\ni.putExtras(b); //where I is intent"
    },{"id":"29",
      "q":"What is fragment?",
      "answer":"Fragment is a part of Activity. By the help of fragments, we can display multiple screens on one activity."
    },{"id":"30",
      "q":"What is NDK?",
      "answer":"NDK stands for Native Development Kit. By using NDK, you can develop a part of app using native language such as C/C++ to boost the performance."
    },{"id":"31",
      "q":"Where can you define the icon for your Activity? ",
      "answer":"Icon for an Activity is defined in the manifest file.\n\n<activityandroid:icon=”@drawable/app_icon”android:name=”.MyTestActivity”></activity>"
    },{"id":"32",
      "q":" What are Dalvik Executable files?",
      "answer":"Dalvik Executable files have .dex extension and are zipped into a single .apk file on the device.  "
    },{"id":"33",
      "q":"Define Activity application component.?",
      "answer":"It is used to provide interactive screen to the users.It can contain many user interface components. A typical Android application consists of multiple activities that are loosely bound to each other.Android developer has to define a main activity that is launched on the application startup. "
    },{"id":"34",
      "q":"What does ADT stand for?",
      "answer":"ADT stands for Android Development Tools .The Android SDK includes several tools and utilities to help you create, test, and debug your projects."
    },{"id":"35",
      "q":"What is a Toast Notification?",
      "answer":"A toast notification is a message that pops up on the surface of the window. It only fills the amount of space required for the message and the user’s current activity remains visible and interactive. The notification automatically fades in and out, and does not accept interaction events."
    },{"id":"36",
      "q":"What do containers hold?",
      "answer":"Containers hold objects and widgets in a specified arrangement.They can also hold labels, fields, buttons, or child containers."
    },{"id":"37",
      "q":"  What is the function of an intent filter?",
      "answer":"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."
    },{"id":"38",
      "q":"When is the onStop() method invoked?",
      "answer":"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."
    },{"id":"39",
      "q":"What are the different states wherein a process is based?",
      "answer":"There are 4 possible states:\n\n– foreground activity\n\n– visible activity\n\n– background activity\n\n– empty process"
    },{"id":"40",
      "q":"What is the AndroidManifest.xml?",
      "answer":"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."
    },{"id":"41",
      "q":"What is the importance of Default Resources?",
      "answer":"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."
    },{"id":"42",
      "q":"  What data types are supported by AIDL?",
      "answer":"AIDL has support for the following data types:\n\n-string\n\n-charSequence\n\n-List\n\n-Map\n\n-all native Java data types like int,long, char and Boolean"
    },{"id":"43",
      "q":" When is the best time to kill a foreground activity?",
      "answer":"  SThe 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."
    },{"id":"44",
      "q":"What composes a typical Android application project?",
      "answer":" 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."
    },{"id":"45",
      "q":" What is a Sticky Intent?",
      "answer":"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."
    },{"id":"46",
      "q":"What is Adapter in Android?",
      "answer":"An adapter is used to create a child view to present the parent view items.  "
    },{"id":"47",
      "q":"What is sleep mode in Android?",
      "answer":"In sleep mode, CPU is slept and doesn't accept any commands from android device except Radio interface layer and alarm."
    },{"id":"48",
      "q":"Define Android Architecture?",
      "answer":"Android architecture consists of 4 components:\n\nLinux Kernal\n\nLibraries\n\nAndroid Framework\n\nAndroid Applications"
    },{"id":"49",
      "q":"Name the dialog box which are supported by android?",
      "answer":"Alert Dialog\n\nProgress Dialog\n\nDate Picker Dialog\n\nTime picker Dialog"
    },{"id":"50",
      "q":" When does onResume() method called?",
      "answer":"onResume is called when activity come to foreground."
    },{"id":"51", "q":"What is a resource?",
      "answer":"A user defined JSON, XML, bitmap, or other file, injected into the application build process, which can later be loaded from code.  "
    },
    {"id":"52",
      "q":"What is Xmpp used for?",
      "answer":"Extensible Messaging and Presence Protocol (XMPP) is a communications protocol for message-oriented middleware based on XML (Extensible Markup Language). "
    },{"id":"53",
      "q":"What is a candidate key? ",
      "answer":"A table may have more than one combination of columns that could uniquely identify the rows in a table; each combination is a candidate key.   "
    },{"id":"54",
      "q":"What is portable wi-fi hotspot?",
      "answer":"Portable Wi-Fi Hotspot allows you to share your mobile internet connection to other wireless device.\n\nFor 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."
    },{"id":"55",
      "q":"What is sleep mode in Android?  ",
      "answer":"In sleep mode, CPU is slept and doesn’t accept any commands from android device except Radio interface layer and alarm."
    },{"id":"56",
      "q":"What is the importance of Default Resources?",
      "answer":" 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."
    },{"id":"57",
      "q":"What is the ViewHolder-Pattern? ",
      "answer":"The ViewHolder design pattern can be used to increase the speed at which a ListView renders data.\n\nThe pattern avoids the repeated lookup of view resources. The number of times which the findViewById() method is invoked is drastically reduced, existing views do not have to be garbage collected and new views do not have to be inflated.The view references for every row are stored in a simple object for later reuse."
    },{"id":"58",
      "q":"What is a StateListDrawable?",
      "answer":"A StateListDrawable is a drawable object defined in the XML that allows us to show a different color/background for a view for different states.\n\nEssentially it’s used for Buttons to show a different look for each state(pressed,focused, selected, none)."
    },{"id":"59",
      "q":"How do you find any view element into your program?",
      "answer":"Findviewbyid: Finds a view that was identified by the id attribute from the XML processed inActivity.OnCreate(Bundle).\n\nSyntax\n\n[Android.Runtime.Register(“findViewById”, “(I)Landroid/view/View;”, “GetFindViewById_IHandler”)]\n\npublic virtual View FindViewById (Int32 id)"
    },{"id":"60",
      "q":" How would you create an AUTOINCREMENT field?",
      "answer":"For autoincrement, you have to declare a column of the table to be INTEGER PRIMARY KEY,then whenever you insert a NULL into that column of the table,the NULL is automatically converted into an integer which is one greater than the largest value of that column over all other rows in the table, or 1 if the table is empty."
    },{"id":"61",
      "q":" What is a friend?",
      "answer":"Friends can be either functions or other classes. The class grants friends unlimited access privileges."
    },




    {"id":"62",
      "q":"How To Remove Desktop Icons And Widgets?",
      "answer":"Press and Hold the icon or widget. The phone will vibrate and on the bottom of the phone you will see anoption to remove. While still holding the icon or widget drag it to the remove button. Once remove turns red drop the item and it is gone."
    },
    {"id":"63",
      "q":" What are the different storage methods in android?",
      "answer":"Shared Preferences – Store private primitive data in key-value pairs. This sometimes gets limited as it offers only key value pairs. You cannot save your own java types.\n\nInternal Storage – Store private data on the device memory\n\nExternal Storage – Store public data on the shared external storage\n\nSQLite Databases – Store structured data in a private database. You can define many number of tables and can store data like other RDBMS."
    },

    {"id":"64",
      "q":"Is it possible to get the source code back from binary file?",
      "answer":"Technically it is possible to generate the source code from binary. It is called reverse engineering. There are lot of reverse engineering tools available. But, in actual case most of them will not re generate the exact source code back because many information will be lost due to compiler optimization and other interpretations."
    },

    {"id":"65",
      "q":"What is virtual destructors? Why they are used?",
      "answer":"Virtual destructors are used for the same purpose as virtual functions. When you remove an object of subclass, which is referenced by a parent class pointer, only destructor of base class will get executed. But if the destructor is defined using virtual keyword, both the destructors [ of parent and sub class ] will get invoked."
    },
    {"id":"66",
      "q":"What is a StateListDrawable?",

      "answer":"A StateListDrawable is a drawable object defined in the XML that allows us to show a different color/background for a view for different states. Essentially it’s used for Buttons to show a different look for each state(pressed,focused, selected, none)."
    },

    {"id":"67",
      "q":"How would you create an AUTOINCREMENT field?",
      "answer":"For autoincrement, you have to declare a column of the table to be INTEGER PRIMARY KEY, then whenever you insert a NULL into that column of the table, the NULL is automatically converted into an integer which is one greater than the largest value of that column over all other rows in the table, or 1 if the table is empty."
    },

    {"id":"68",
      "q":"What is the proper way of setting up an Android-powered device for app development?",

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

    {"id":"69",
      "q":"Which types of flags are used to run an application on Android?",
      "answer":"FLAG_ACTIVITY_NEW_TASK\n\nFLAG_ACTIVITY_CLEAR_TOP"
    },
    {"id":"70",
      "q":"Do all mobile phones support the latest Android operating system?",
      "answer":"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."
    },

    {"id":"71",
      "q":" What are the life cycle methods of android activity?There are 7 life-cycle methods of activity.",
      "answer":"They are as follows:\n\n1.   onCreate()\n\n2.    onStart()\n\n3.    onResume()\n\n4.    onPause()\n\n5.    onStop()\n\n6.    onRestart()\n\n7.    onDestroy()"
    },

    {"id":"72",
      "q":"What is the difference between TRUNCATE and DELETE commands?",
      "answer":"Both will result in deleting all the rows in the table .TRUNCATE call cannot be rolled back as it is a DDL command and all memory space for that table is released back to the server. TRUNCATE is much faster.Whereas DELETE call is an DML command and can be rolled back."
    },

    {"id":"73",
      "q":"What do you mean by a template?",
      "answer":"Templates enable creation of generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types unless they fulfill the functionality of a macro.\n\n- Its prototype can be one of the following : template function_declaration; template function_declaration;\n\n- The only difference between both prototypes is the use of keyword class or typename. It's use is indistinct since both expressions have exactly the same meaning and behave exactly the same way."
    },

    {"id":"74",
      "q":"How long does compatibility take?",
      "answer":"The process is automated. The Compatibility Test Suite generates a report that can be provided to Google to verify compatibility. Eventually we intend to provide self-service tools to upload these reports to a public database."
    },
    {"id":"75",
      "q":" What is the main purpose of a Fragment?",
      "answer":"The main purpose of a Fragment is to support a more dynamic UI (tablets, smartphones) and also to make the reuse of UI components a lot easier.\n\nA Fragment can also exist without its own UI as an invisible worker for the Activity.\n\nA Fragment is closely tied to the Activity it is in. When the Activity is paused, so are all fragments in it; When the Activity is destroyed, so are all fragments in it."
    }
  ]

}