technicalsymposium

Free Advertisement Procedure and Free Email /Whatsapp Updates

Free Email Alerts-Subscribe Below


Enter your Email ID here:

Note:Login & Check Your Email Inbox and Activate Confirmation Link

Technical Round Materials-Android-Free Download

Technical Round Materials-Android-Free Download

1. What is Application?

The Application class in Android is the base class within an Android app that contains all other components such as activities and services. The Application class, or any subclass of the Application class, is instantiated before any other class when the process for your application/package is created.

2. What is Context?

A Context is a handle to the system; it provides services like resolving resources, obtaining access to databases and preferences, and so on. An Android app has activities. Context is like a handle to the environment your application is currently running in.
Application Context: This context is tied to the lifecycle of an application. The application context can be used where you need a context whose lifecycle is separate from the current context or when you are passing a context beyond the scope of an activity.
Activity Context: This context is available in an activity. This context is tied to the lifecycle of an activity. The activity context should be used when you are passing the context in the scope of an activity or you need the context whose lifecycle is attached to the current context.

3. What is Armv7?

There are 3 CPU architectures in Android. ARMv7 is the most common as it is optimised for battery consumption. ARM64 is an evolved version of that that supports 64-bit processing for more powerful computing. ARMx86, is the least used for these three, since it is not battery friendly. It is more powerful than the other two.

4. Why bytecode cannot be run in Android?

Android uses DVM (Dalvik Virtual Machine ) rather using JVM(Java Virtual Machine).

5. What is a BuildType in Gradle? And what can you use it for?

Build types define properties that Gradle uses when building and packaging your Android app.

1. A build type defines how a module is built, for example whether ProGuard is run.

2. A product flavour defines what is built, such as which resources are included in the build.

3. Gradle creates a build variant for every possible combination of your project’s product flavours and build types.

6. Explain the build process in Android:

1. First step involves compiling the resources folder (/res) using the aapt (android asset packaging tool) tool. These are compiled to a single class file called R.java. This is a class that just contains constants.

2. Second step involves the java source code being compiled to .class files by javac, and then the class files are converted to Dalvik bytecode by the “dx” tool, which is included in the sdk ‘tools’. The output is classes.dex.

3. The final step involves the android apkbuilder which takes all the input and builds the apk (android packaging key) file.

7. What is the Android Application Architecture?

Android application architecture has the following components:

1. Services - It will perform background functionalities

2. Intent - It will perform the inter connection between activities and the data passing mechanism

3. Resource Externalization - strings and graphics

4. Notification - light, sound, icon, notification, dialog box and toast

5. Content Providers - It will share the data between applications

8. Describe activities

Activities are basically containers or windows to the user interface.

9. Lifecycle of an Activity

  • OnCreate(): This is when the view is first created. This is normally where we create views, get data from bundles etc.
  • OnStart(): Called when the activity is becoming visible to the user. Followed by onResume() if the activity comes to the foreground, or onStop() if it becomes hidden.
  • OnResume(): Called when the activity will start interacting with the user. At this point your activity is at the top of the activity stack, with user input going to it.
  • OnPause(): Called as part of the activity lifecycle when an activity is going into the background, but has not (yet) been killed.
  • OnStop(): Called when you are no longer visible to the user.
  • OnDestroy(): Called when the activity is finishing
  • OnRestart(): Called after your activity has been stopped, prior to it being started again

10. What’s the difference between onCreate() and onStart()?

  • The onCreate() method is called once during the Activity lifecycle, either when the application starts, or when the Activity has been destroyed and then recreated, for example during a configuration change.
  • The onStart() method is called whenever the Activity becomes visible to the user, typically after onCreate() or onRestart().

11. Scenario in which only onDestroy is called for an activity without onPause() and onStop()?

If finish() is called in the OnCreate method of an activity, the system will invoke onDestroy() method directly.

12. Why would you do the setContentView() in onCreate() of Activity class?

As onCreate() of an Activity is called only once, this is the point where most initialisation should go. It is inefficient to set the content in onResume() or onStart() (which are called multiple times) as the setContentView() is a heavy operation.

13. onSavedInstanceState() and onRestoreInstanceState() in activity?

OnRestoreInstanceState() - When activity is recreated after it was previously destroyed, we can recover the saved state from the Bundle that the system passes to the activity. Both the onCreate() and onRestoreInstanceState() callback methods receive the same Bundle that contains the instance state information. But because the onCreate() method is called whether the system is creating a new instance of your activity or recreating a previous one, you must check whether the state Bundle is null before you attempt to read it. If it is null, then the system is creating a new instance of the activity, instead of restoring a previous one that was destroyed.

onSaveInstanceState() - is a method used to store data before pausing the activity.

14. Launch modes in Android?

  • Standard : When an activity is launched, it will create a new instance of the activity and it be added separately to the backstack.
  • SingleTop : It is the same as the standard, except if there is a previous instance of the activity that exists in the stack, then it will not create a new instance but rather send the intent to the existing instance of the activity.
  • SingleTask : The activity will have only one instance. So if the activity is already in the task, the intent will be redirected to onNewIntent() else a new instance will be created.
  • SingleInstance : Same as single task but the system does not launch any activities in the same task as this activity. If new activities are launched, they are done so in a separate task.

15. How does the activity respond when the user rotates the screen?

When the screen is rotated, the current instance of activity is destroyed a new instance of the Activity is created in the new orientation. The onRestart() method is invoked first when a screen is rotated. The other lifecycle methods get invoked in the similar flow as they were when the activity was first created.

16. How to prevent the data from reloading and resetting when the screen is rotated?

The most basic approach is to add an element attribute tag android:configChanges inside the activity tag in the AndroidManifest.xml. android:configChanges="orientation|screenSize"

17. Mention two ways to clear the back stack of Activities when a new Activity is called using intent

The first approach is to use a FLAG_ACTIVITY_CLEAR_TOP flag. The second way is by using FLAG_ACTIVITY_CLEAR_TASK and FLAG_ACTIVITY_NEW_TASK in conjunction.

18. What’s the difference between FLAG_ACTIVITY_CLEAR_TASK and FLAG_ACTIVITY_CLEAR_TOP?

FLAG_ACTIVITY_CLEAR_TASK is used to clear all the activities from the task including any existing instances of the class invoked. The Activity launched by intent becomes the new root of the otherwise empty task list. This flag has to be used in conjunction with FLAG_ ACTIVITY_NEW_TASK.

FLAG_ACTIVITY_CLEAR_TOP on the other hand, if set and if an old instance of this Activity exists in the task list then barring that all the other activities are removed and that old activity becomes the root of the task list. Else if there’s no instance of that activity then a new instance of it is made the root of the task list. Using FLAG_ACTIVITY_NEW_TASK in conjunction is a good practice, though not necessary.

19. Describe content providers

A ContentProvider provides data from one application to another, when requested. It manages access to a structured set of data. It provides mechanisms for defining data security. ContentProvider is the standard interface that connects data in one process with code running in another process.

When you want to access data in a ContentProvider, you must instead use the ContentResolver object in your application’s Context to communicate with the provider as a client. The provider object receives data requests from clients, performs the requested action, and returns the results.

20. Access data using Content Provider:

Start by making sure your Android application has the necessary read access permissions. Then, get access to the ContentResolver object by calling getContentResolver() on the Context object, and retrieving the data by constructing a query using ContentResolver.query().

The ContentResolver.query() method returns a Cursor, so you can retrieve data from each column using Cursor methods.

21. Describe services

Service is a component that is used to perform operations on the background such as playing music, handle network transactions. Services can run in the background even in the application is destroyed.

22. Difference between Service & Intent Service

  • Service is the base class for Android services that can be extended to create any service. A class that directly extends Service runs on the main thread so it will block the UI (if there is one) and should therefore either be used only for short tasks or should make use of other threads for longer tasks.
  • IntentService is a subclass of Service that handles asynchronous requests (expressed as “Intents”) on demand. Clients send requests through startService(Intent) calls. The service is started as needed, handles each Intent in turn using a worker thread, and stops itself when it runs out of work.

23. Difference between AsyncTasks & Threads?

  • Thread should be used to separate long running operations from main thread so that performance is improved. But it can’t be cancelled elegantly and it can’t handle configuration changes of Android. You can’t update UI from Thread.
  • AsyncTask can be used to handle work items shorter than 5ms in duration. With AsyncTask, you can update UI unlike java Thread. But many long running tasks will choke the performance.

24. Difference between Service, Intent Service, AsyncTask & Threads

  • Android service is a component that is used to perform operations on the background such as playing music. It doesn’t has any UI (user interface). The service runs in the background indefinitely even if application is destroyed.
  • AsyncTask allows you to perform asynchronous work on your user interface. It performs the blocking operations in a worker thread and then publishes the results on the UI thread, without requiring you to handle threads and/or handlers yourself.
  • IntentService is a base class for Services that handle asynchronous requests (expressed as Intents) on demand. Clients send requests through startService(Intent) calls; the service is started as needed, handles each Intent in turn using a worker thread, and stops itself when it runs out of work.
  • A thread is a single sequential flow of control within a program. Threads can be thought of as mini-processes running within a main process.

25. What are Handlers?

Handlers are objects for managing threads. It receives messages and writes code on how to handle the message. They run outside of the activity’s lifecycle, so they need to be cleaned up properly or else you will have thread leaks.

  • Handlers allow communicating between the background thread and the main thread.
  • A Handler class is preferred when we need to perform a background task repeatedly after every x seconds/minutes.

26. What is a Job Scheduling?

Job Scheduling api, as the name suggests, allows to schedule jobs while letting the system optimize based on memory, power, and connectivity conditions. The JobScheduler supports batch scheduling of jobs. The Android system can combine jobs so that battery consumption is reduced. JobManager makes handling uploads easier as it handles automatically the unreliability of the network. It also survives application restarts. Some scenarios:

  • Tasks that should be done once the device is connect to a power supply
  • Tasks that require network access or a Wi-Fi connection.
  • Task that are not critical or user facing
  • Tasks that should be running on a regular basis as batch where the timing is not critical

27. What is the relationship between the life cycle of an AsyncTask and an Activity? What problems can this result in? How can these problems be avoided?

An AsyncTask is not tied to the life cycle of the Activity that contains it. So, for example, if you start an AsyncTask inside an Activity and the user rotates the device, the Activity will be destroyed (and a new Activity instance will be created) but the AsyncTask will not die but instead goes on living until it completes.

Then, when the AsyncTask does complete, rather than updating the UI of the new Activity, it updates the former instance of the Activity (i.e., the one in which it was created but that is not displayed anymore!). This can lead to an Exception (of the type java.lang.IllegalArgumentException: View not attached to window manager if you use, for instance, findViewById to retrieve a view inside the Activity).

There’s also the potential for this to result in a memory leak since the AsyncTask maintains a reference to the Activity, which prevents the Activity from being garbage collected as long as the AsyncTask remains alive.

For these reasons, using AsyncTasks for long-running background tasks is generally a bad idea . Rather, for long-running background tasks, a different mechanism (such as a service) should be employed.

Note: AsyncTasks by default run on a single thread using a serial executor, meaning it has only 1 thread and each task runs one after the other.

28. What is the onTrimMemory() method?

onTrimMemory(): Called when the operating system has determined that it is a good time for a process to trim unneeded memory from its process. This will happen for example when it goes in the background and there is not enough memory to keep as many background processes running as desired.

Android can reclaim memory for from your app in several ways or kill your app entirely if necessary to free up memory for critical tasks. To help balance the system memory and avoid the system’s need to kill your app process, you can implement the ComponentCallbacks2 interface in your Activity classes. The provided onTrimMemory() callback method allows your app to listen for memory related events when your app is in either the foreground or the background, and then release objects in response to app lifecycle or system events that indicate the system needs to reclaim memory.

29. Android Bound Service

A bound service is a service that allows other android components (like activity) to bind to it and send and receive data. A bound service is a service that can be used not only by components running in the same process as local service, but activities and services, running in different processes, can bind to it and send and receive data.

  • When implementing a bound service we have to extend Service class but we have to override onBind method too. This method returns an object that implements IBinder, that can be used to interact with the service.

Implementing Android bound service with Android Messenger

  • Service based on Messenger can communicate with other components in different processes, known as Inter Process Communication (IPC), without using AIDL.
  • A service handler : this component handles incoming requests from clients that interact with the service itself.
  • A Messenger : this class is used to create an object implementing IBinder interface so that a client can interact with the service.
  • Example Implementation:
  • 30. AIDL vs Messenger Queue
  • As Ariq Ahmad mentioned in the response, Messenger Queue builds us a queue and the data/messages are passed between 2 or more processes sequential. But in case of AIDL the messages are passed in parallel.
  • AIDL is for the purpose when you’ve to go application level communication for data and control sharing, a scenario depicting it can be : An app requires list of all contacts from Contacts app (content part lies here) plus it also wants to show the call’s duration and you can also disconnect it from that app (control part lies here).
  • In Messenger queues you’re more IN the application and working on threads and processes to manage the queue having messages so no Outside services interference here.
  • Messenger is needed if you want to bind a remote service (e.g. running in another process).

31. What is a ThreadPool? And is it more effective than using several separate Threads?

Creating and destroying threads has a high CPU usage, so when we need to perform lots of small, simple tasks concurrently, the overhead of creating our own threads can take up a significant portion of the CPU cycles and severely affect the final response time. ThreadPool consists of a task queue and a group of worker threads, which allows it to run multiple parallel instances of a task.

32. Difference between Serializable and Parcelable?

Serialization is the process of converting an object into a stream of bytes in order to store an object into memory, so that it can be recreated at a later time, while still keeping the object’s original state and data.

How to disallow serialization? We can declare the variable as transient.

Serializable is a standard Java interface. Parcelable is an Android specific interface where you implement the serialization yourself. It was created to be far more efficient than Serializable (The problem with this approach is that reflection is used and it is a slow process. This mechanism also tends to create a lot of temporary objects and cause quite a bit of garbage collection.).

33. Difference between Activity & Service

Activities are basically containers or windows to the user interface. Services is a component that is used to perform operations on the background. It does not have an UI.

34. How would you update the UI of an activity from a background service?

We need to register a LocalBroadcastReceiver in the activity. And send a broadcast with the data using intents from the background service. As long as the activity is in the foreground, the UI will be updated from the background. Ensure to unregister the broadcast receiver in the onStop() method of the activity to avoid memory leaks. We can also register a Handler and pass data using Handlers.

35. What is an intent?

Intents are messages that can be used to pass information to the various components of android. For instance, launch an activity, open a webview etc. Two types of intents-

  • Implicit: Implicit intent is when you call system default intent like send email, send SMS, dial number.
  • Explicit: Explicit intent is when you call an application activity from another activity of the same application.

36. What is a Sticky Intent?

Sticky Intents allows communication between a function and a service. sendStickyBroadcast() performs a sendBroadcast(Intent) known as sticky, i.e. the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of registerReceiver(BroadcastReceiver, IntentFilter).

37. What is a Pending Intent?

If you want someone to perform any Intent operation at future point of time on behalf of you, then we will use Pending Intent.

38. What is an Action?

Description of the intent. For instance, ACTION_CALL?—?used to perform calls

39. What are intent Filters?

Specifies the type of intent that the activity/service can respond to.

40. Describe fragments:

Fragment is a UI entity attached to Activity. Fragments can be reused by attaching in different activities. Activity can have multiple fragments attached to it. Fragment must be attached to an activity and its lifecycle will depend on its host activity.

41. Describe fragment lifecycle

  • onAttach() : The fragment instance is associated with an activity instance.The fragment and the activity is not fully initialized. Typically you get in this method a reference to the activity which uses the fragment for further initialization work.
  • onCreate() : The system calls this method when creating the fragment. You should initialize essential components of the fragment that you want to retain when the fragment is paused or stopped, then resumed.
  • onCreateView() : The system calls this callback when it’s time for the fragment to draw its user interface for the first time. To draw a UI for your fragment, you must return a View component from this method that is the root of your fragment’s layout. You can return null if the fragment does not provide a UI.
  • onActivityCreated() : The onActivityCreated() is called after the onCreateView() method when the host activity is created. Activity and fragment instance have been created as well as the view hierarchy of the activity. At this point, view can be accessed with the findViewById() method. example. In this method you can instantiate objects which require a Context object
  • onStart() : The onStart() method is called once the fragment gets visible.
  • onResume() : Fragment becomes active.
  • onPause() : The system calls this method as the first indication that the user is leaving the fragment. This is usually where you should commit any changes that should be persisted beyond the current user session.
  • onStop() : Fragment going to be stopped by calling onStop()
  • onDestroyView() : Fragment view will destroy after call this method
  • onDestroy() :called to do final clean up of the fragment’s state but Not guaranteed to be called by the Android platform.

42. What is the difference between fragments & activities. Explain the relationship between the two.

An Activity is an application component that provides a screen, with which users can interact in order to do something whereas a Fragment represents a behavior or a portion of user interface in an Activity (with its own lifecycle and input events, and which can be added or removed at will).

43. When should you use a fragment rather than an activity?

  • When there are ui components that are going to be used across multiple activities.
  • When there are multiple views that can be displayed side by side (viewPager tabs)
  • When you have data that needs to be persisted across Activity restarts (such as retained fragments)

44. Difference between adding/replacing fragment in backstack?

During replace, when back is clicked, the view is re-created. During add, fragment is added to backstack

45. Why is it recommended to use only the default constructor to create a Fragment?

The reason why you should be passing parameters through bundle is because when the system restores a fragment (e.g on config change), it will automatically restore your bundle. This way you are guaranteed to restore the state of the fragment correctly to the same state the fragment was initialised with.

46. You’re replacing one Fragment with another?—?how do you ensure that the user can return to the previous Fragment, by pressing the Back button?

We need to save each Fragment transaction to the backstack, by calling addToBackStack() before you commit() that transaction

47. Callbacks invoked during addition of a fragment to back stack and while popping back from back stack:

addOnBackStackChangedListener is called when fragment is added or removed from the backstack.

48. What are retained fragments?

By default, Fragments are destroyed and recreated along with their parent Activity’s when a configuration change occurs. Calling setRetainInstance(true) allows us to bypass this destroy-and-recreate cycle, signaling the system to retain the current instance of the fragment when the activity is recreated.

49. Difference between FragmentAdapter vs FragmentStateAdapter?

  • FragmentAdapter: the fragment of each page the user visits will be stored in memory, although the view will be destroyed. So when the page is visible again, the view will be recreated but the fragment instance is not recreated. This can result in a significant amount of memory being used. FragmentPagerAdapter should be used when we need to store the whole fragment in memory. FragmentPagerAdapter calls detach(Fragment) on the transaction instead of remove(Fragment).
  • FragmentStateAdapter : the fragment instance is destroyed when it is not visible to the User, except the saved state of the fragment. This results in using only a small amount of Memory and can be useful for handling larger data sets. Should be used when we have to use dynamic fragments, like fragments with widgets, as their data could be stored in the savedInstanceState.Also it won’t affect the performance even if there are large number of fragments.

50. What is Toast in Android?

Android Toast can be used to display information for the short period of time. A toast contains message to be displayed quickly and disappears after sometime.

51. What are Loaders in Android?

Loader API was introduced in API level 11 and is used to load data from a data source to display in an activity or fragment. Loaders persist and cache results across configuration changes to prevent duplicate queries.

52. What is the difference between Dialog & DialogFragment?

A fragment that displays a dialog window, floating on top of its activity’s window. This fragment contains a Dialog object, which it displays as appropriate based on the fragment’s state. Dialogs are entirely dependent on Activities. If the screen is rotated, the dialog is dismissed. Dialog fragments take care of orientation, configuration changes as well.

53. Difference between margin & padding?

Padding will be space added inside the container, for instance, if it is a button, padding will be added inside the button. Margin will be space added outside the container.

54. What is View Group? How are they different from Views?

View: View objects are the basic building blocks of User Interface(UI) elements in Android. View is a simple rectangle box which responds to the user’s actions. Examples are EditText, Button, CheckBox etc. View refers to the android.view.View class, which is the base class of all UI classes.

ViewGroup: ViewGroup is the invisible container. It holds View and ViewGroup. For example, LinearLayout is the ViewGroup that contains Button(View), and other Layouts also. ViewGroup is the base class for Layouts.

55. What is the difference between a regular .png and a nine-patch image?

It is one of a resizable bitmap resource which is being used as backgrounds or other images on the device. The NinePatch class allows drawing a bitmap in nine sections. The four corners are unscaled; the middle of the image is scaled in both axes, the four edges are scaled into one axis.

56. Difference between RelativeLayout and LinearLayout?

Linear Layout ?—?Arranges elements either vertically or horizontally. i.e. in a row or column.

Relative Layout? —?Arranges elements relative to parent or other elements.

57. What is ConstraintLayout?

It allows you to create large and complex layouts with a flat view hierarchy (no nested view groups). It’s similar to RelativeLayout in that all views are laid out according to relationships between sibling views and the parent layout, but it’s more flexible than RelativeLayout and easier to use with Android Studio’s Layout Editor.

58. When might you use a FrameLayout?

Frame Layouts are designed to contain a single item, making them an efficient choice when you need to display a single View.

If you add multiple Views to a FrameLayout then it’ll stack them one above the other, so FrameLayouts are also useful if you need overlapping Views, for example if you’re implementing an overlay or a HUD element.

59. What is Adapters?

An adapter responsible for converting each data entry into a View that can then be added to the AdapterView (ListView/RecyclerView).

60. How to support different screen sizes?

  • Create a flexible layout ?—?The best way to create a responsive layout for different screen sizes is to use ConstraintLayout as the base layout in your UI. ConstraintLayout allows you to specify the position and size for each view according to spatial relationships with other views in the layout. This way, all the views can move and stretch together as the screen size changes.
  • Create stretchable nine-patch bitmaps
  • Avoid hard-coded layout sizes? —?Use wrap_content or match_parent. Create alternative layouts?—?The app should provide alternative layouts to optimise the UI design for certain screen sizes. For eg: different UI for tablets
  • Use the smallest width qualifier ?—?For example, you can create a layout named main_activity that’s optimised for handsets and tablets by creating different versions of the file in directories as follows:
    res/layout/main_activity.xml?—?For handsets (smaller than 600dp available width)
    res/layout-sw600dp/main_activity.xml
    ?—?For 7” tablets (600dp wide and bigger).
  • The smallest width qualifier specifies the smallest of the screen’s two sides, regardless of the device’s current orientation, so it’s a simple way to specify the overall screen size available for your layout.

61. Outline the process of creating custom Views:

  • Create a class that Subclass a view
  • Create a res/values/attrs.xml file and declare the attributes you want to use with your custom View.
  • In your View class, add a constructor method, instantiate the Paint object, and retrieve your custom attributes.
  • Override either onSizeChanged() or onMeasure().
  • Draw your View by overriding onDraw().

62. Briefly describe some ways that you can optimize View usage

  • Checking for excessive overdraw: install your app on an Android device, and then enable the “Debug GPU Overview” option.
  • Flattening your view hierarchy: inspect your view hierarchy using Android Studio’s ‘Hierarchy Viewer’ tool.
  • Measuring how long it takes each View to complete the measure , layout, and draw phases. You can also use Hierarchy Viewer to identify any parts of the rendering pipeline that you need to optimise.

63. Bitmap pooling in android?

Bitmap pooling is a simple technique, that aims to reuse bitmaps instead of creating new ones every time. When you need a bitmap, you check a bitmap stack to see if there are any bitmaps available. If there are not bitmaps available you create a new bitmap otherwise you pop a bitmap from the stack and reuse it. Then when you are done with the bitmap, you can put it on a stack.

64. How to load bitmap to memory?

65. What are the permission protection levels in Android?

  • Normal ?—?A lower-risk permission that gives requesting applications access to isolated application-level features, with minimal risk to other applications, the system, or the user. The system automatically grants this type of permission to a requesting application at installation, without asking for the user’s explicit approval.
  • Dangerous ?—?A higher-risk permission. Any dangerous permissions requested by an application may be displayed to the user and require confirmation before proceeding, or some other approach may be taken to avoid the user automatically allowing the use of such facilities.
  • Signature ?—?A permission that the system grants only if the requesting application is signed with the same certificate as the application that declared the permission. If the certificates match, the system automatically grants the permission without notifying the user or asking for the user’s explicit approval.
  • SignatureOrSystem ?—?A permission that the system grants only to applications that are in the Android system image or that are signed with the same certificate as the application that declared the permission.

66. What is an Application Not Responding (ANR) error, and how can you prevent them from occurring in an app?

An ANR dialog appears when your UI has been unresponsive for more than 5 seconds, usually because you’ve blocked the main thread. To avoid encountering ANR errors, you should move as much work off the main thread as possible.

67. What is a singleton class in Android?

A singleton class is a class which can create only an object that can be shared all other classes.

private static volatile RESTService instance;
protected RESTService(Context context) {
super(context);
}

public static RESTService getInstance(Context context) {
if (instance == null) {
synchronized (RESTService.class) {
if (instance == null) instance = new RESTService(context);
}
}
return instance;
}

68. What’s the difference between commit() and apply() in SharedPreferences?

commit() writes the data synchronously and returns a boolean value of success or failure depending on the result immediately.

apply() is asynchronous and it won’t return any boolean response. Also if there is an apply() outstanding and we perform another commit(). The commit() will be blocked until the apply() is not completed.

69. How does RecyclerView differ from ListView?

  • ViewHolder Pattern: Recyclerview implements the ViewHolders pattern whereas it is not mandatory in a ListView. A RecyclerView recycles and reuses cells when scrolling.
  • What is a ViewHolder Pattern? ?—?A ViewHolder object stores each of the component views inside the tag field of the Layout, so you can immediately access them without the need to look them up repeatedly. In ListView, the code might call findViewById() frequently during the scrolling of ListView, which can slow down performance. Even when the Adapter returns an inflated view for recycling, you still need to look up the elements and update them. A way around repeated use of findViewById() is to use the "view holder" design pattern.
  • LayoutManager: In a ListView, the only type of view available is the vertical ListView. A RecyclerView decouples list from its container so we can put list items easily at run time in the different containers (linearLayout, gridLayout) by setting LayoutManager.
  • Item Animator: ListViews are lacking in support of good animations, but the RecyclerView brings a whole new dimension to it.

70. How would you implement swipe animation in Android

<set xmlns:android=" http://schemas.android.com/apk/res/android " android:shareInterpolator=”false”>
<translate android:fromXDelta=”-100%”
android:toXDelta=”0%”
android:fromYDelta=”0%”
android:toYDelta=”0%”
android:duration=”700"/>
</set>

71. Arraymap/SparseArray vs HashMap in Android?

72. How to plug memory Leak in Android?

73. How to reduce apk size in Android?

The summary the article states:

  • Enable proguard in your project by adding following lines to your release build type.
  • Enable shrinkResources .
  • Strip down all the unused locale resources by adding required resources name in “resConfigs”.
  • Convert all the images to the webp or vector drawables.

74. How to reduce build time of an android application?

What I got from the article was: A few commands we can add to the gradle.properties file:

  • org.gradle.configureondemand=true - This command will tell gradle to only build the projects that it really needs to build.
  • Use Daemon?—?org.gradle.daemon=true - Daemon keeps the instance of the gradle up and running in the background even after your build finishes. This will remove the time required to initialize the gradle and decrease your build timing significantly.
  • org.gradle.parallel=true - Allow gradle to build your project in parallel. If you have multiple modules in you project, then by enabling this, gradle can run build operations for independent modules parallelly.
  • Increase Heap Size?—?org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 - Since android studio 2.0, gradle uses dex in the process to decrease the build timings for the project. Generally, while building the applications, multiple dx processes runs on different VM instances. But starting from the Android Studio 2.0, all these dx processes runs in the single VM and that VM is also shared with the gradle. This decreases the build time significantly as all the dex process runs on the same VM instances. But this requires larger memory to accommodate all the dex processes and gradle. That means you need to increase the heap size required by the gradle daemon. By default, the heap size for the daemon is about 1GB.
  • Ensure that dynamic dependency is not used. i.e. do not use
    implementation 'com.android.support:appcompat-v7:27.0.+'.
    This command means gradle will go online and check for the latest version every time it builds the app.
    Instead use fixed versions i.e. 'com.android.support:appcompat-v7:27.0.2'

I followed the steps in there and reduced by build time from 167 seconds to 65 seconds ~ 38%.

75. Android Architecture Components?

.

76. Difference between MVC & MVP & MVVM?

MVC is the Model-View-Controller architecture where model refers to the data model classes. The view refers to the xml files and the controller handles the business logic. The issue with this architecture is unit testing. The model can be easily tested since it is not tied to anything. The controller is tightly coupled with the android apis making it difficult to unit test. Modularity & flexibility is a problem since the view and the controller are tightly coupled. If we change the view, the controller logic should also be changed. Maintenance is also an issues.

MVP architecture: Model-View-Presenter architecture. The View includes the xml and the activity/fragment classes. So the activity would ideally implement a view interface making it easier for unit testing (since this will work without a view).

1) What is Android?

Android is an open-source, linux-based operating system that is used in mobiles, tablets, televisions etc.


2) Who is the founder of Android?

Andy Rubin.


3) Explain the Android application Architecture.

Following is a list of components of Android application architecture:

  • Services: Used to perform background functionalities.
  • Intent: Used to perform the inter connection between activities and the data passing mechanism.
  • Resource Externalization: strings and graphics.
  • Notification: light, sound, icon, notification, dialog box and toast.
  • Content Providers: It will share the data between applications.

4) What are the code names of android?

1. Aestro

2. Blender

3. Cupcake

4. Donut

5. Eclair

6. Froyo

7. Gingerbread

8. Honycomb

9. Ice Cream Sandwitch

10. Jelly Bean

11. Kitkat

12. Lollipop

13. Marshmallow


5) What are the advantages of android?

Open-source: It means no licence, distribution and development fee.

Platform-independent: It supports windows, mac and linux platforms.

Supports various technologies: It supports camera, bluetooth, wifi, speech, EDGE etc. technologies.

Highly optimized Virtual Machine: Android uses highly optimized virtual machine for mobile devices, called DVM (Dalvik Virtual Machine).


6) Does android support other language than java?

Yes, android app can be developed in C/C++ also using android NDK (Native Development Kit). It makes the performance faster. It should be used with android SDK.


7) What are the core building blocks of android?

The core building blocks of android are:

  • Activity
  • View
  • Intent
  • Service
  • Content Provider
  • Fragment etc.

8) What is activity?

Activity is like a frame or window in java that represents GUI. It represents one screen of android.


9) What are the life cycle methods of android activity?

There are 7 life-cycle methods of activity. They are as follows:

1. onCreate()

2. onStart()

3. onResume()

4. onPause()

5. onStop()

6. onRestart()

7. onDestroy()


10) What is intent?

It is a kind of message or information that is passed to the components. It is used to launch an activity, display a web page, send sms, send email etc. There are two types of intents in android:

1. Implicit Intent

2. Explicit Intent


11) What is implicit intent in android?

Implicit intent is used to invoke the system components.


12) What is explicit intent in android?

Explicit intent is used to invoke the activity class.


13) How to call another activity in android?

1. Intent i = new Intent(getApplicationContext(), ActivityTwo.class);

2. startActivity(i);


14) What is service in android?

A service is a component that runs in the background. It is used to play music, handle network transaction etc.


15) What is the name of database used in android?

SQLite: An opensource and lightweight relational database for mobile devices.


16) What is AAPT?

AAPT is an acronym for android asset packaging tool. It handles the packaging process.


17) What is content provider?

Content providers are used to share information between android applications.


18) What is fragment?

Fragment is a part of Activity. By the help of fragments, we can display multiple screens on one activity.


19) What is ADB?

ADB stands for Android Debug Bridge. It is a command line tool that is used to communicate with the emulator instance.


20) What is NDK?

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.


21) What is ANR?

ANR stands for Application Not Responding. It is a dialog box that appears if the application is no longer responding.


22) What is the Google Android SDK?

The Google Android SDK is a toolset which is used by developers to write apps on Android enabled devices. It contains a graphical interface that emulates an Android driven handheld environment and allow them to test and debug their codes.


23) What is an APK format?

APK is a short form stands for Android Packaging Key. It is a compressed key with classes,UI's, supportive assets and manifest. All files are compressed to a single file is called APK.


24) Which language does Android support to develop an application?

Android applications are written by using the java (Android SDK) and C/C++ (Android NDK).


25) What is ADT in Android?

ADT stands for Android Development Tool. It is used to develop the applications and test the applications.


26) What is View Group in Android?

View Group is a collection of views and other child views. It is an invisible part and the base class for layouts.


27) What is Adapter in Android?

An adapter is used to create a child view to present the parent view items.


28) What is nine-patch images tool in Android?

We can change bitmap images in nine sections as four corners, four edges and an axis.


29) Which kernel is used in Android?

Android is customized Linux 3.6 kernel.


30) What is application Widgets in Android?

Application widgets are miniature application views that can be embedded in other applications and receive periodic updates.


31) Which types of flags are used to run an application on Android?

Following are two types of flags to run an application in Android:

  • FLAG_ACTIVITY_NEW_TASK
  • FLAG_ACTIVITY_CLEAR_TOP

32) What is singleton class in Android?

A singleton class is a class which can create only an object that can be shared all other classes.


33) What is sleep mode in Android?

In sleep mode, CPU is slept and doesn't accept any commands from android device except Radio interface layer and alarm.


34) What do you mean by a drawable folder in Android?

In Android, a drawable folder is compiled visual resource that can use as a backgrounds, banners, icons, splash screen etc.


35) What is DDMS?

DDMS stands for Dalvik Debug Monitor Server. It gives the wide array of debugging features:

1. Port forwarding services

2. Screen capture

3. Thread and heap information

4. Network traffic tracking

5. Location data spoofing


36) Define Android Architecture?

Android architecture consists of 4 components:

1. Linux Kernal

2. Libraries

3. Android Framework

4. Android Applications

37) What is a portable wi-fi hotspot?

The portable wi-fi hotspot is used to share internet connection to other wireless devices.

38) Name the dialog box which are supported by android?

  • Alert Dialog
  • Progress Dialog
  • Date Picker Dialog
  • Time picker Dialog

39) Name some exceptions in android?

  • Inflate Exception
  • Surface.OutOfResourceException
  • SurfaceHolder. BadSurfaceTypeException
  • WindowManager.BadTokenException

40) What are the basic tools used to develop an android app?

  • JDK
  • Eclipse+ADT plugin
  • SDK Tools

1. Android Characteristics

Criteria

Result

Type of Operating System

Open Source

OS Fragmentation

Multiple OS versions & interoperability concerns

Customization

Heightened customization possible

2. Why cannot you run standard Java bytecode on Android?

Android uses Dalvik Virtual Machine (DVM) which requires a special bytecode. First of all, we have to convert Java class files into Dalvik Executable files using an Android tool called “dx”. In normal circumstances, developers will not be using this tool directly and build tools will care for the generation of DVM compatible files.

3. Can Android application only be programmed in Java?

No, it is not necessary. You can program Android apps can be created using NDK in C/C++. The NDK is a toolset that allows you to implement parts of your app using native-code languages such as C and C++. Typically, good use cases for the NDK are CPU-intensive applications such as game engines, signal processing, and physics simulation.

Download Android Interview Questions asked by top MNCs in 2018

GET PDF

4. Where will you declare your activity so the system can access it?

Activity is to be declared in the manifest file. For example:

1. <manifest></manifest>

2. <application></application>

3. <activity android:name=”.MyIntellipaat”>

5. What is the difference between a regular .png and a nine-patch image?

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.

6. What is the difference between an implicit intent and explicit intent?

There are two types of Intent implicit and explicit intent, let see some more difference between them.

Implicit: Implicit intent is when you call system default intent like send email, send SMS, dial number.

For example,

Intent sendIntent = new Intent();

sendIntent.setAction(Intent.ACTION_SEND);

sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);

sendIntent.setType("text/plain")

startactivity(sendIntent);

Explicit: Explicit intent when you call you're on application activity from one activity to another

For example, first activity to second activity:

Intent intent = new Intent(first.this, second.class);

startactivity(intent);

7. Where can you define the icon for your Activity?

The icon for an Activity is defined in the manifest file.

Code

<activity android:icon="@drawable/app_icon" android:name=".MyTestActivity"></activity>

which means you have to Open AndroidManifest.xml.Right under the root “manifest” node of the XML, we can see the “application” node. We have added this attribute to “application”. (The “icon” in “@drawable/icon” refers to the file name of the icon.)
android:icon=”@drawable/icon”

8. What is ADB?

ADB stands for Android Debug Bridge. It is a command line tool that is used to communicate with the emulator instance. ADB can control your device over USB from a computer, copy files back and forth, install and uninstall apps, run shell commands, and more. It is a client-server program that includes three components:
• A client, which runs on your development machine. You can invoke a client from a shell by issuing an ADB command. Other Android tools such as DDMS also create ADB clients.
• A server, which runs as a background process on your development machine. The server manages communication between the client and the ADB daemon running on an emulator or device.
• A daemon, which runs as a background process on each emulator or device instance.

9. What are the different storage methods in Android?

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.

10. What is action in Android?

In Android, the action is a description of something that an intent sender desires.
SYNTAX:

CONTAINED IN:
DESCRIPTION:
Adds 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.

11. What is an ANR notification in Android?

ANR is short for Application Not Responding. Android 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.

12. Enumerate three key loops when monitoring an activity?

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

13. How do you find any view element into your program?

Findviewbyid : Finds a view that was identified by the id attribute from the XML processed inActivity.OnCreate(Bundle).

Syntax

[Android.Runtime.Register("findViewById", "(I)Landroid/view/View;", "GetFindViewById_IHandler")]

public virtual View FindViewById (Int32 id)

Advanced Questions

1. Which dialog boxes can you use in your Android application?

  • AlertDialog : An alert dialogue box supports 0 to 3 buttons and a list of selectable elements.
  • ProgressDialog : An extension to AlertDialog and you may add buttons to it. It shows a progress wheel or a progress bar.
  • DatePickerDialog : It is used for selecting a date by the user.
  • TimePickerDialog : It is used for selecting time by the user.

2. Name the resource that is a compiled visual resource and can be used as a background, title, or in other part of the screen.

Drawable is the virtual resource that can be used as a background, title, or in other parts of the screen. It is compiled into an android.graphics.drawable subclass. A Drawable resource is a general concept for a graphic which can be drawn. The simplest case is a graphical file (bitmap), which would be represented in Android via a BitmapDrawable class.
The Drawable is stored as individual files in one of the res/drawable folders. The ADT project creation wizard creates these folders by default. You would store bitmaps for different resolutions in the -mdpi, -hdpi, -xhdpi, -xxhdpi subfolders of res/drawable If these bitmaps are provided in a different folder, the Android system selects the correct one automatically based on the device configuration.

3. How can two Android applications share same Linux user ID and share same VM?

The applications must sign with the same certificate in order to share same Linux user ID and share same VM.

4. Can you deploy executable JARs on Android? Which packaging is supported by Android?

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.

5. Is it okay to change the name of an application after its deployment?

It is not recommended to change the application name after its deployment because this action may break some functionality. For example, shortcuts will not work if you change application name.

6. How can ANR be prevented?

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.

7. How can your application perform actions that are provided by other application e.g. sending email?

Intents are created to define an action that we want to perform and launches the appropriate activity from another application.

Code
 
Intent intent = new Intent(Intent.ACTION_SEND);intent.putExtra(Intent.EXTRA_EMAIL, recipientArray);
 
startActivity(intent);

8. How will you pass data to sub-activities?

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

Code
 
Bundle b=new Bundle();
b.putString(“Email”, “abc@xyz.com”);
i.putExtras(b); //where I is intent

Top Answers to Spark Interview Questions

1. Compare MapReduce and Spark?

Criteria

MapReduce

Spark

Processing Speeds

Good

Excellent (up to 100 times faster)

Data caching

Hard disk

In-memory

Perform iterative jobs

Average

Excellent

Independent of Hadoop

No

Yes

Machine learning applications

Average

Excellent

2. What is Apache Spark?

Spark is a fast, easy-to-use and flexible data processing framework. It has an advanced execution engine supporting cyclic data flow and in-memory computing. Spark can run on Hadoop, standalone or in the cloud and is capable of accessing diverse data sources including HDFS, HBase, Cassandra and others.

3. Explain key features of Spark.

  • Allows Integration with Hadoop and files included in HDFS.
  • Spark has an interactive language shell as it has an independent Scala (the language in which Spark is written) interpreter.
  • Spark consists of RDD’s (Resilient Distributed Datasets), which can be cached across computing nodes in a cluster.
  • Spark supports multiple analytic tools that are used for interactive query analysis , real-time analysis and graph processing

4. Define RDD?

RDD is the acronym for Resilient Distribution Datasets – a fault-tolerant collection of operational elements that run parallel. The partitioned data in RDD is immutable and distributed. There are primarily two types of RDD:

1. Parallelized Collections : The existing RDD’s running parallel with one another.

2. Hadoop datasets : perform function on each file record in HDFS or other storage system

5. What does a Spark Engine do?

Spark Engine is responsible for scheduling, distributing and monitoring the data application across the cluster.

6. Define Partitions?

As the name suggests, partition is a smaller and logical division of data similar to ‘split’ in MapReduce. Partitioning is the process to derive logical units of data to speed up the processing process. Everything in Spark is a partitioned RDD.

7. What operations RDD support?

  • Transformations.
  • Actions

8. What do you understand by Transformations in Spark?

Transformations are functions applied on RDD, resulting into another RDD. It does not execute until an action occurs. map() and filer() are examples of transformations, where the former applies the function passed to it on each element of RDD and results into another RDD. The filter() creates a new RDD by selecting elements form current RDD that pass function argument.

9. Define Actions.

An action helps in bringing back the data from RDD to the local machine. An action’s execution is the result of all previously created transformations. reduce() is an action that implements the function passed again and again until one value if left. take() action takes all the values from RDD to local node.

10. Define functions of SparkCore?

Serving as the base engine, SparkCore performs various important functions like memory management, monitoring jobs, fault-tolerance, job scheduling and interaction with storage systems.

11. What is RDD Lineage?

Spark does not support data replication in the memory and thus, if any data is lost, it is rebuild using RDD lineage. RDD lineage is a process that reconstructs lost data partitions. The best is that RDD always remembers how to build from other datasets.

12. What is Spark Driver?

Spark Driver is the program that runs on the master node of the machine and declares transformations and actions on data RDDs. In simple terms, driver in Spark creates SparkContext, connected to a given Spark Master.
The driver also delivers the RDD graphs to Master, where the standalone cluster manager runs.

13. What is Hive on Spark?

Hive contains significant support for Apache Spark, wherein Hive execution is configured to Spark:

hive> set spark.home=/location/to/sparkHome;
hive> set hive.execution.engine=spark;

Hive on Spark supports Spark on yarn mode by default.

14. Name commonly-used Spark Ecosystems.

  • Spark SQL (Shark)- for developers.
  • Spark Streaming for processing live data streams.
  • GraphX for generating and computing graphs.
  • MLlib (Machine Learning Algorithms).
  • SparkR to promote R Programming in Spark engine.

15. Define Spark Streaming.

Spark supports stream processing – an extension to the Spark API , allowing stream processing of live data streams. The data from different sources like Flume, HDFS is streamed and finally processed to file systems, live dashboards and databases. It is similar to batch processing as the input data is divided into streams like batches.

16. What is GraphX?

Spark uses GraphX for graph processing to build and transform interactive graphs. The GraphX component enables programmers to reason about structured data at scale.

17. What does MLlib do?

MLlib is scalable machine learning library provided by Spark. It aims at making machine learning easy and scalable with common learning algorithms and use cases like clustering, regression filtering, dimensional reduction, and alike.

18. What is Spark SQL?

SQL Spark, better known as Shark is a novel module introduced in Spark to work with structured data and perform structured data processing. Through this module, Spark executes relational SQL queries on the data. The core of the component supports an altogether different RDD called SchemaRDD, composed of rows objects and schema objects defining data type of each column in the row. It is similar to a table in relational database.

19. What is a Parquet file?

Parquet is a columnar format file supported by many other data processing systems. Spark SQL performs both read and write operations with Parquet file and consider it be one of the best big data analytics format so far.

20. What file systems Spark support?

  • Hadoop Distributed File System (HDFS).
  • Local File system.
  • S3

21. What is Yarn?

Similar to Hadoop, Yarn is one of the key features in Spark, providing a central and resource management platform to deliver scalable operations across the cluster . Running Spark on Yarn necessitates a binary distribution of Spar as built on Yarn support.

22. List the functions of Spark SQL.?

Spark SQL is capable of:

  • Loading data from a variety of structured sources.
  • Querying data using SQL statements, both inside a Spark program and from external tools that connect to Spark SQL through standard database connectors (JDBC/ODBC). For instance, using business intelligence tools like Tableau.
  • Providing rich integration between SQL and regular Python/Java/Scala code, including the ability to join RDDs and SQL tables, expose custom functions in SQL, and more.

23. What are benefits of Spark over MapReduce?

  • Due to the availability of in-memory processing, Spark implements the processing around 10-100x faster than Hadoop MapReduce. MapReduce makes use of persistence storage for any of the data processing tasks.
  • Unlike Hadoop, Spark provides in-built libraries to perform multiple tasks form the same core like batch processing, Steaming, Machine learning, Interactive SQL queries. However, Hadoop only supports batch processing.
  • Hadoop is highly disk-dependent whereas Spark promotes caching and in-memory data storage.
  • Spark is capable of performing computations multiple times on the same dataset. This is called iterative computation while there is no iterative computing implemented by Hadoop.

24. Is there any benefit of learning MapReduce, then?

Yes, MapReduce is a paradigm used by many big data tools including Spark as well. It is extremely relevant to use MapReduce when the data grows bigger and bigger. Most tools like Pig and Hive convert their queries into MapReduce phases to optimize them better.

25. What is Spark Executor?

When SparkContext connect to a cluster manager, it acquires an Executor on nodes in the cluster. Executors are Spark processes that run computations and store the data on the worker node. The final tasks by SparkContext are transferred to executors for their execution.

26. Name types of Cluster Managers in Spark.

The Spark framework supports three major types of Cluster Managers:

1. Standalone : a basic manager to set up a cluster.

2. Apache Mesos : generalized/commonly-used cluster manager, also runs Hadoop MapReduce and other applications.

3. Yarn : responsible for resource management in Hadoop

27. What do you understand by worker node?

Worker node refers to any node that can run the application code in a cluster.

28. What is PageRank?

A unique feature and algorithm in graph, PageRank is the measure of each vertex in the graph. For instance, an edge from u to v represents endorsement of v’s importance by u. In simple terms, if a user at Instagram is followed massively, it will rank high on that platform.

29. Do you need to install Spark on all nodes of Yarn cluster while running Spark on Yarn?

No because Spark runs on top of Yarn.

30. Illustrate some demerits of using Spark.

Since Spark utilizes more storage space compared to Hadoop and MapReduce, there may arise certain problems. Developers need to be careful while running their applications in Spark. Instead of running everything on a single node, the work must be distributed over multiple clusters.

31. How to create RDD?

Spark provides two methods to create RDD:• By parallelizing a collection in your Driver program. This makes use of SparkContext’s ‘parallelize’ methodval IntellipaatData = Array(2,4,6,8,10)
val distIntellipaatData = sc.parallelize(IntellipaatData)• By loading an external dataset from external storage like HDFS, shared file system.

29. Do you need to install Spark on all nodes of Yarn cluster while running Spark on Yarn?

No because Spark runs on top of Yarn.

30. Illustrate some demerits of using Spark.

Since Spark utilizes more storage space compared to Hadoop and MapReduce, there may arise certain problems. Developers need to be careful while running their applications in Spark. Instead of running everything on a single node, the work must be distributed over multiple clusters.

31. How to create RDD?

Spark provides two methods to create RDD:• By parallelizing a collection in your Driver program. This makes use of SparkContext’s ‘parallelize’ methodval IntellipaatData = Array(2,4,6,8,10)
val distIntellipaatData = sc.parallelize(IntellipaatData)• By loading an external dataset from external storage like HDFS, shared file system.

10. Write the various kind of data providers?

There are various kinds of data providers are:

  • OLAP servers
  • Queries over universe
  • Personal data files
  • SAP
  • VBA procedures
  • Stored procedures
  • Free hand-SQL

11. What do you mean by drill mode?

It is a kind of study mode related to BO and helps in breaching data as well as in presenting data from all the available angles and the levels of details for analyzing the factors which caused the good and bad result.

12. Define personal connection?

It can be made only by one user and can’t be used by the others. The details for same are kept in a PDAC.LSI file.

13. Define Shared connection?

It is opposite of personal connection as it can be used by others also through a server which is common one. In this details of connections are kept in SDAC>LSI file which is there in installation folder.

14. Define secured connection?

It is a kind of connection which overcomes the disadvantages related with the former connection. We can use universe in central repository by secured connection.

15. What is custom hierarchies?

It defines the universe for providing the drill down which is customized and occur between objects from same or different classes taking care of the user requirements.

16. How we can create Custom Hierarchies?

We can create custom hierarchies by clicking on tools then choosing hierarchies from BO designer.

17. What do you understand by context in the universe?

Context can be explained as the specific path of join between a specific group of joins or the tables for the purpose of a specific query.

18. How we can create Custom Hierarchies?

We can create custom hierarchies by clicking on tools then choosing hierarchies from BO designer.

19. What is Chasm Trap.

It is a situation which arises at the time when the value in the fact table get wrong when it is measured from two various fact tables.

20. How the problem of Chasm Trap be solved?

It can be solved by two methods:

  • By using SQL parameter in universe which generates SQL statement for each measures and result into a correct output.
  • The second one is involving two joints in different contexts.

21. Define Derived tables?

They are created in the universe. It is used for complex calculations which can’t be sorted out in the report level. The other useful feature of derived table is that by using dblink we can use the table from other schema.

22. what is User Objects.

It is a universe of classes and objects which is developed by the universe designer. Once the objects which is there in the universe does not matches our requirement, then the user can create his own objects which is known as User objects.

23. Name @functions.

The @functions are:

  • @where
  • @ Prompt
  • @ script
  • @Variable
  • @Select

24. Write the uses of @functions.

The @prompt function tells the end user to write any specific values.
The @script function recovers the result of the Visual Basics for applications macro’s.
The @select function re-used the existing statements.

25. Business object consists of how many domains? Write them.

Three Domains are there in Business Objects

  • Document
  • Security
  • Universe

26. Define secured connection?

It is a kind of connection which overcomes the disadvantages related with the former connection. We can use universe in central repository by secured connection.

27. How we can use one derived table from another?

Using @Derived_table function, we can use one derived table from another. The syntax is:
@derived_table(derived table name)

28. What is Slice in Business Objects.

It is used to reset, rename and omit the blocks. It works with the master or detailed reports.

29. Differentiate between Dice and Slice.

  • Dice: It shows the data and removes the data.
  • Slice: It reset, rename and delete the blocks.

30. Define master/detail report?

Big block of data can be break into small sections by using master or detail report. Replication in values can be avoided by using this.

31. What is class?

Collection of objects in a universe is known as class. Subclasses are derived from the class.

32. How many possible ways are there for linking universes?

  • There are three ways:
  • The Master approach.
  • The Kernal approach.
  • The Component approach.

33. What is data mining?

It is a process by which we can extract the needed details from the database.

34. Write the available Drill modes.

The available Drill modes are;

  • Drill down.
  • Drill up
  • Drill through.
  • Drill by

35. What is aggregate_awarness?

We use aggregate_awarness function to define one object for measures in fact tables when we have a same fact tables in different grains, the syntax is as,
@aggregate_aware(highest_level.lower level)

36. What is fan trap?

A one to many join links to a table which answer with another one to many join links is known as fan trap.

37. What is Data provider?

The question or the data source is known as the data provider.

38. At what time we use a context?

Context is developed when the dimension objects are their in one or both fact tables.

39. Define standard mode?

Only the clients inside the group can be accessed in the standard mode.

40. Write the schema supported by Business Objects Designer.

There are five different schemas supported by Business Objects designer

  • Snowflake schema.
  • Star schema
  • Normalized production schema
  • Multistar schema.
  • Data warehouse with aggregates.

41. What is Channel?

It is to make the users know up-to-date information. Channel is a website with ‘push’ technology.

42. What are the limitations over user objects?

User objects are not common between the end users. It is kept in a specific user object definition file. Hence if any end-user tries to refresh or edit the query contains another user’s user object, it will be routinely cleaned and removed.

43. Name the tasks of universe designer.

The tasks are:

  • Creating the universe.
  • Designing the universe.
  • Distributing the universe.
  • Maintaining the universe

44. Write the main components of designer interface.

The main components are:

  • The structure pane.
  • The table browser
  • The universe pane.

45. Define report bursting?

We use report bursting for maintaining the version documents according to the user profiles.

46. What is WEBI?

It is a solution that is particular in supporting the decisions related with reports, queries, and analysis.

47. What is the full form of DSS?

Decision Support Systems.

48. What is strategies?

Strategies is used for extracting automatically structural data from database or from a flat file.

49. Define universe?

Universe is a group of objects and classes. These objects and classes will be projected for an application or a set of users.

50. What is secured mode?

Secured mode blocked the contact of specific users over specific commands.

51. Define Drill by?

Drill by is used to move to other hierarchy and examine the other data, which belongs to another hierarchy.

52. Define list of values?

It is a file which has the data values linked with an object.

2. Explain What is IBM DataStage?

Datastage is an extract, transform and load tool that is part of the IBM Infosphere suite. It is a tool that is used for working with large data warehouses and data marts for creating and maintaining such a data repository.

3. How is a DataStage source file filled?

We can develop an SQL query or we can use a row generator extract tool through which we can fill the source file in Data Stage.

4. How is merging done in DataStage?

Merging is done when two or more tables are expected to be combined based on their primary key column. This is the basis for merging in Data Stage.

5. What is a data file and a descriptor file?

Both these files are as the name indicates are serving different purpose in Data Stage. The descriptor files contain all the information or description while the data file is the one that just contains the data.

6. How is DataStage different from Informatica?

Data stage and Informatica are both powerful ETL tools but there are a few difference between the two tools. Data stage has the parallelism and partition concept for node configuration whereas the Informatica tool there is not support for parallelism in node configuration. Data stage is simpler to use as compared to Informatica.

7. What is a Routine in Data Stage?

The DataStage manager defines a collection of functions within this tool which is called as a Routine. There are basically there types of Routines in DataStage namely Job Control Routine, Before/After Sub-routine, Transform Function.

8. What is the process for removing duplicates in DataStage?

The duplicates within the data stage can be removed using the sort function. While running the sort function you need specify for the option which allows for duplicates by setting it to false

9. What is the difference between Join, Merge & Lookup stage?

The fundamental difference between these three stages is the amount of memory they take. Other than that how they treat the input requirement and the various records is also a differentiating factor. So based on memory usage, the Lookup stage uses a very less amount of memory. Both Lookup and Merge use a huge amounts of memory.

10. What is the quality state in DataStage?

The quality state is used for cleansing the data with the DataStage tool. It is a client server software tool that is provided as part of the IBM Information server.

11. What is job control in DataStage?

This tool is used for control the job or executing multiple jobs in a parallel manner. It is deployed using the Job Control Language within the IBM data stage tool.

12. How to do DataStage jobs performance tuning?

First you have to select the right configuration files. Then you need to select the right partition and buffer memory. You have to handle the sorting of data and handling null time values. Try to use the modify, copy or filter instead of the transformer. Reduce the propagation of unnecessary metadata between the various stages.

13. What is a repository table in DataStage?

The repository is another name for a data warehouse. It can be centralized or a distributed one. The repository table is used for answering the queries like ad hoc, historical, analytical or complex queries.

14. Compare the massive parallel processing and symmetric multiprocessing?

In the process of massive parallel processing many of the computers are present in the same chasis. While in the symmetric multiprocessing there are many processors that a share the same hardware resources. The massive parallel processing is called as shared nothing as there is no aspect between the various computers. On the other hand the massive parallel processing is faster than the symmetric multiprocessing.

15. How can you kill the DataStage job?

To kill a DataStage job you need to first kill the individual processing ID so that this ensures that the DataStage is killed.

16. How do you compare the validated OK and Compiled processes in DataStage?

The Compiled step ensures tha the important stage parameters are mapped and these are correct so this creates an executable job. Whereas in the Validated OK we make sure that the connections are valid.

17. Explain the feature of data type conversion in DataStage?

If you want to do data conversion in DataStage then you can use the data conversion function. For this to be successfully executed you need to ensure that the input or the output to and from the operator is the same and the record schema needs to be compatible with the operator.

18. What is the significance of the exception activity in DataStage?

Whenever there is an unfamiliar error that is happening when we are executing the job sequencer, during this time all the stages after the exception activity are run. So this makes the exception activity so important in the DataStage.

19. What are the various types of Lookups in DataStage?

There are different types of Lookups in DataStage. These include the Normal, Sparse, Range and Caseless Lookup in DataStage.

20. When do you use a parallel job and a server job?

Using the parallel job or a server job depends on the processing need, functionality, time to implement and the cost. The server job usually runs on a single node, it executes on a DataStage Server Engine and handles small volumes of data. The Parallel job runs on multiple nodes, it executes on a DataStage Parallel Engine and handles large volumes of data.

21. What is usage analysis in DataStage?

If you want to whether a certain job is part of the sequence then you right click in the Manager on the job and then choose the Usage Analysis.

22. How to find in a sequential file the number of rows?

For counting the number of rows, we should use the @INROWNUM variable.

23. What is the difference between a Sequential file and a Hash file?

The Hash file is based on a Hash algorithm and it can used with a key value. The sequential file on the other hand does not have any key column value. The Hash file can be used as a reference for a Look Up while a Sequential file cannot be used for Look Up. Due to the presence fo the Hash key, the Hash file is easier to search than a Sequential file.

24. How do you clean a DataStage Repository?

For cleaning a DataStage Repository you need to go to the DataStage Manager and go to the Job in the Menu bar and go to the Clean Up Resources. If you want to further remove the logs then you need to go to the respective job and clean the log files.

25. How do you call a Routine in DataStage?

The Routines are stored in the Routine branch of the DataStage Repository. This is where you can create, view or edit all the Routines. The Routines in DataStage could be among the following: Job Control Routine, Before-after Sub-Routine, Transform Function.

26. What is the difference between an Operational DataStage and a Data Warehouse?

An Operational DataStage can be considered as a staging area, for real-time analysis, for user processing. Thus it is a temporary repository. Whereas the data warehouse is used for long-term data storage needs and has the complete data of the entire business.

27. What does NLS mean in DataStage?

NLS means National Language Support in DataStage. This means you can use this IBM DataStage tool in various languages like multi-byte character languages like Chinese or Japanese too. You can read and write in any language and process it as per the requirement.

1. SAP BW/BI Characteristics

Criteria

Result

Functionality

Data warehousing and reporting tool

Comprehensive tool

Seamless integration of back-end, analysis and interpretation

2. Define SAP BW/BI?

SAP BW/BI is a Business Information Warehouse, also called as business intelligence. It allows the user to examine information from operative SAP applications also from other business

3. What are the main areas and activities in SAP/BI?

a) Data Warehouse: Integrating, collecting and managing entire company’s data.
b) Analyzing and Planning: Using the data stored in data warehouse.
c) Broad cast publishing: To send the information to the employees using email, fax etc.
d) Reporting: BI provides the tools for reporting in web-browser, excel etc

Download SAP BI/BW Interview Questions asked by top MNCs in 2018

GET PDF

4. Define data Integrity?

It is used to omit replicated entries in the database.

5. Define table partition?

It is done to maintain the large data to ensure the capacity of the application. There are two type of partitioning that is done
a) Logical partitioning
b) Database partitioning

6. What are the features of multi provider?

a) It doesn’t contain any type of data.
b) The data comes completely from the information which is provided.
c) By union operations the info providers are connected.
Data flows from a transactional system to the analytical system (BW). DS ( Data Service) on the transactional system needs to be replicated on BW side and attached to info source and update rules respectively.

7. Define Operational Data Store?

ODS is mostly used for large storage of data . It is a BW architectural module that appears between Persistent Staging Area and infocubes.

8. Define an ‘Infocube’?

Infocube is a data storage area which has a same structure as that of star schema. If we wish to create a infocube we have to require one fact table surmounted by the four dimensions.

9. How many tables info cube have?

It have two tables:
E table and F i.e. fact table

10. What the maximum number of dimensions info cubes contain?

In info cubes contain 16 dimensions.

11. Differentiate between ODS and Info-cubes?

a) Info cube doesn’t have any key but ODS have.
b) Info-cube contains refined data while ODS contains detailed level data.
c) ODS is a flat file structure while Info-cube follows Star Schema

12. Define dimension in BW?

The collection of reference data about a measurable event in data warehousing is known as dimensions in BW.

13. Define info objects?

Info-objects are same as that of fields of the source system. Info objects are the characteristics and key figures.

14. Define modelling?

Modelling is the term which is used for designing of data base.

15. Define extended star schema?

Extended Star Schema is like a star schema in which Master data are kept in a separate tables.

16. Define extractors ?

Extractor is the term which is used to dig out the data from the system program.

17. Define Fact Table?

Fact tables contain the transactional data. It is a group of relations and facts that is foreign key with the dimensions.

18. How many data types are there in characteristics info object?

There are 4 data types:
a) DATS
b) TIMS
c) CHAR
d) NUMC

19. What is the significance of process chain?

Process chain basically automates the data. It automate it like data load, deletion, etc.

20. What are the T-codes for Info-cubes?

The T-codes for Info-Cubes are
a) LISTSCHEMA: Show InfoCube schema
b) LISTCUBE: List viewer for InfoCubes
c) RSDCUBE, RSDCUBED, RSDCUBEM: Start InfoCube editing

21. Write the maximum number of key figures and characteristics?

The maximum number of characteristics are 248 and key figures are 233 .

22. Write the types of extractions.

a. Cross Application (Generic Extractors) : DB View ,Infoset, Function Module
b. Application Specific: BW content FI, HR, CO, SAP CRM, LO cockpit
c. Customer-Generated Extractors: LIS, FI-SL, CO-PA

23. Can an Info-object be converted into an Info-provider?

Yes, an info-object can be converted into an info-provider. To convert this right click on the Info Area and select “ Insert characteristics as data target”.

24. Define multi-provider in SAP BI ? What are the features of Multi providers?

It is a type of info-provider which contains data from various info-providers and makes it available for reporting purposes.

25. Define Conversion Routine?

It is used to convert data types from internal format to external format.

26. Differentiate between the Start routine and Conversion routine?

In the start routine we can modify the data packages, when data is loading, While in conversion routine we can’t modify the data.

27. How we can un-lock objects in Transport Organizer?

In transport organizer to unlock the object, go to SE03à , Request TaskàUnlock objects. When you enter your request and select unlock and execute, it will unlock the request.

28. Define update or transfer routine?

The transfer routine defines Global Data and Global Checks. It is like the Start Routine.

29. Write the types of Multi-providers?

The types of Multi-providers are:
a) Heterogeneous Multi providers: These info-providers only have a few number of characteristics and key figures. It can be used for the modelling of scenarios by dividing them into sub-scenarios. Each sub-scenario is represented by its own info-provider.
b) Homogeneous Multi providers: It consists of technically identical info-providers, such as infocubes with exactly the same characteristics and key figures.

30. Write the transaction codes for process chain?

a) RSPCM: Monitor daily process chains
b) RSPC1: Process Chain Display
c) RSPC: Process Chain Maintenance
d) RZ20: To see log for process chains

31. What is the T.code for Data Archival and what is their advantage?

T.code is the SARA,and its advantage is to query performance, load performance, minimizes space.

32. Define BEx Map in SAP BI?

It is one of the most important characteristics for SAP BI .It gives the geographical information like customer, customer sales region and country.

33. Define B/W statistics and how it is used?

B/W statistics is useful in presenting data about the costs linked with the B/W queries, OLAP, aggregative data etc.

34. What do you understand by data target administration task?

Data target administration task includes
a) Complete deletion of data target
b) Construct database statistics
c) Generate Index
d) Delete Index

35. Write the options when defining aggregates?

a) Blank-None
b) F-Fixed Value
c) H- Hierarchy
d) *- Groups according to characteristics

36. Define the term ‘slowly changing dimension?

Slowly changing dimensions is the dimension that changes with time.

37. Tell how we can create a connection with LIS Info Structures?

To create a connection with LIS info-structure click on LBW0 it will connects LIS info-structures to BW.

38. Write the delta options available when load from flat file?

Three options are available:

1. Additive delta

2. New status for changed records

3. Full upload

39. Write the steps within SAP BI to create classes for BW?

To create classes for BW we have to follow the following steps,
a) Click on post-processing of data sources
b) Click on IMG activity
c) Select BW or any desired node you want to select
d) Click on context menu
e) Press F6 or select “Create node”
After following these steps, a new dialog box will appear, where we can insert our node or class for BW.

40. Define data ware-housing hierarchy?

TData ware housing is used to define data aggregation hierarchy. It is a logical structure which use ordered levels as a means of organizing data.

41. How we can debug errors with SAP GUI ?

To debug errors in SAP GUI we have to follow the path
a) Run Bexanalyzer
b) Business Explorer menu item
c) Installation check
It will show an excel sheet with start button, on clicking on it, it will verify the GUI installation

42. Define compression?

It is a procedure used to omit the Request IDs and this saves space.

43. Define Return Tables?

When we want to go back to many records, instead of single value, we use the return table in the Update Routine.

44. How many extra partitions are created before and after date?

2 partitions are created before the begin date and after the end date.

45. How we can optimize the dimensions?

We should explain as many dimensions as we can and we have to take care that no single dimension crosses the limit of more than 20% of the fact table size.

46. What all options are available in transfer rule?

  • Formula
  • Routine
  • Constant
  • InfoObject

47. Define Rollup?

Rollup is used to pack new DataPackages into the InfoCube aggregates. It is important to perform Rollup because than in InfoCube data will not be available while reporting on the aggregate.

48. What are the options available in transfer rule?

  • ABAP routine or a Formula
  • Assign a Constant ,
  • Assign info object,

49. How the B/W statistics is important?

It is important because it is useful in measuring the performance of how quickly the queries are calculated or how quickly the data is loaded into BW.

50. Explain the data target administration task ?

The data target administration task are delete index, generate index, construct database statistics, initial fill of new aggregates, etc.

51. How we can transform Open Hub Data?

Using BADI we can transform Open Hub data.

39. Write the steps within SAP BI to create classes for BW?

To create classes for BW we have to follow the following steps,
a) Click on post-processing of data sources
b) Click on IMG activity
c) Select BW or any desired node you want to select
d) Click on context menu
e) Press F6 or select “Create node”
After following these steps, a new dialog box will appear, where we can insert our node or class for BW.

40. Define data ware-housing hierarchy?

TData ware housing is used to define data aggregation hierarchy. It is a logical structure which use ordered levels as a means of organizing data.

41. How we can debug errors with SAP GUI ?

To debug errors in SAP GUI we have to follow the path
a) Run Bexanalyzer
b) Business Explorer menu item
c) Installation check
It will show an excel sheet with start button, on clicking on it, it will verify the GUI installation

42. Define compression?

It is a procedure used to omit the Request IDs and this saves space.

43. Define Return Tables?

When we want to go back to many records, instead of single value, we use the return table in the Update Routine.

44. How many extra partitions are created before and after date?

2 partitions are created before the begin date and after the end date.

45. How we can optimize the dimensions?

We should explain as many dimensions as we can and we have to take care that no single dimension crosses the limit of more than 20% of the fact table size.

46. What all options are available in transfer rule?

  • Formula
  • Routine
  • Constant
  • InfoObject

47. Define Rollup?

Rollup is used to pack new DataPackages into the InfoCube aggregates. It is important to perform Rollup because than in InfoCube data will not be available while reporting on the aggregate.

48. What are the options available in transfer rule?

  • ABAP routine or a Formula
  • Assign a Constant ,
  • Assign info object,

49. How the B/W statistics is important?

It is important because it is useful in measuring the performance of how quickly the queries are calculated or how quickly the data is loaded into BW.

50. Explain the data target administration task ?

The data target administration task are delete index, generate index, construct database statistics, initial fill of new aggregates, etc.

51. How we can transform Open Hub Data?

Using BADI we can transform Open Hub data.

4. What ITIL process ensures that the organization is aware of new and changing technology?

Capacity Management is responsible for ensuring that the organization is aware of new and changing technology. It is the discipline that checks and verifies that IT infrastructure is provided at the right time in the right volume at a right price with utmost efficiency.
This involves input from many areas of the business to identify what services are (or will be) required, what IT infrastructure is required to support these services, what level of Contingency will be needed, and what will be the cost of this infrastructure.

5. Suppose a Service Level Manager requires confirmation wherein the internal Service Desk can answer a certain percentage of calls within 10 seconds. In what document would the Service Desk’s agreement to this requirement be recorded?

An operational level agreement (OLA) is a contract that defines how various IT groups within a company plan to deliver a service or set of services. OLAs are designed to address and solve the problem of IT silos by setting forth a specific set of criteria and defining a specific set of IT services to be performed by each department.
It should be noted that the term Service Level Agreement (SLA) is used in many companies while discussing agreements between two internal groups. However, according to Information Technology Infrastructure Library (ITIL) framework for best practices, this type of internal contract should is better known as an Operational Level Agreement.

6. What two Service Management processes will most likely use risk analysis and management methodology?

The two service management processes are- Availability Management and IT Service Continuity Management
ITIL Availability Management aims at defining, analyzing, planning, measuring and improving all aspects of the availability of IT services. Availability Management is responsible for ensuring that all IT infrastructure, processes, tools, roles, etc are appropriate for the agreed availability targets.
IT Service Continuity Management (ITSCM) aims at managing risks that could seriously impact IT services. ITSCM ensures that the IT service provider can always provide minimum agreed Service Levels, by reducing the risk from disaster events to an acceptable level and planning for the recovery of IT services. ITSCM should be designed to support Business Continuity Management.

7. Explain Service portfolio, Service catalogue and service pipeline.

Service portfolio – Defines services provided by service provider across all Market and all customers. The objective of ITIL Service Portfolio Management is to manage the service portfolio. Service Portfolio Management ensures that the service provider has the right mix of services to meet required business outcomes at an appropriate level of investment.
Service Catalogue is the sub set of Service portfolio. Services ready to be offered to customers is listed in service catalogue. An IT service catalog, sometimes called an IT service portfolio, is a list of available technology resources and offerings within an organization.
Service Pipeline consists of services under development. It is a great opportunity to view the direction of a service provider’s growth as it discusses and includes the future services that are currently under development by the service provider.

8. What is the difference between ITIL v3 and v2?

  • The ITIL v2 library was organized in seven core books:
    (i) Service Support,
    (ii) Service Delivery,
    (iii) ICT Infrastructure Management,
    (iv) Planning to Implement Service Management,
    (v) Application Management,
    (vi) The Business Perspective and
    (vii) Security Management
    On the other hand, ITIL v3 is now organized into just five books:
    (i) Service Strategy,
    (ii) Service Design,
    (iii) Service Transition,
    (iv) Service Operation and
    (v) Continual Service Improvement
    Basically the V2 process areas have been logically grouped into a phased lifecycle approach
  • In contrast to ITIL v2, ITIL v3 clearly defines the roles and responsibilities in each process and reasons the role of communication in the entire lifecycle.

9. What are the different knowledge management systems?

Different knowledge management systems are:-

  • CMIS (Capacity Management information system) – A Capacity Management Information System or CMIS is a collection of IT infrastructure usage, capacity and performance information that is gathered in a consistent manner and stored in one or more databases. It is a single book of record for all usage, capacity, and performance data, complete with associated business, application and service statistics. Any IT staffer who needs access to capacity management data can potentially use a CMIS.
  • AMIS (Availability management information system) – A virtual repository of all Availability Management data, usually stored in multiple physical locations.
  • KEDB (Known error database) – A Known Error is a problem that has a documented root cause and a Work around. Known Errors are managed throughout their lifecycle by the Problem Management process. The details of each Known Error are recorded in a Known Error Record stored in the Known Error Database (KEDB).
  • CMDB (Configuration management database) – A configuration management database (CMDB) is a database that contains all relevant information about the components of the information system used in an organization’s IT services and the relationships between those components. A CMDB provides an organized view of data and a means of examining that data from any desired perspective. Within this context, components of an information system are referred to as configuration items (CI). A CI can be any conceivable IT component, including software, hardware, documentation, and personnel as well as any combination of them. The processes of configuration management specify, control, and track configuration items and any changes made to them in a comprehensive and systematic fashion.
  • DML (Definitive media library) – A Definitive Media Library (DML) is a secure compound in which the definitive, authorized versions of software package configuration items (CIs) are stored and protected. A DML consists of one or more software libraries or file-storage areas referred to as repositories.
  • SKMS (Service knowledge management system) – ITIL Knowledge Management aims at gathering, analyzing, storing and sharing knowledge and information within an organization. The primary purpose of Knowledge Management is to improve efficiency by reducing the need to rediscover knowledge

10. What are the ITIL based models adopted by an organization.

  • Microsoft MOF: Microsoft Operations Framework (MOF) is a series of 23 documents that guide IT professionals through the processes of creating, implementing and managing efficient and cost-effective services.
  • Hewlett – Packard (HP ITSM Reference Model): – This model is a significant tool useful in presenting and describing the several IT Management processes, inter-process relationships, and business linkages that IT needs to put in place for successful development, deployment and support of services in the e-world.
  • IBM (IT Process Model ): – IBM Process and Service Models software is an industry template that enables you to define common business processes and services across the enterprise. The software consists of a set of best practice business process models and service definitions to support core system renewal and integration projects.

11. What is the relation between Availability, Availability service time and downtime?

Availability % = (Available service time –downtime) / Available service time
to ensure that all the IT services are available and are functioning correctly whenever customers and users want to use them in the framework of the SLAs in force.

12. What is ISO/IEC 27002?

ISO/IEC 27002:2013 gives guidelines for organizational information security standards and information security management practices including selection, implementation and management of controls, taking into consideration the organization’s information security risk environment(s).
It is designed to be used by organizations that intend to:

  • Select controls within the process of implementing an Information Security Management System based on ISO/IEC 27001;
  • Implement commonly accepted information security controls, and
  • Develop their independent information security management guidelines.

13. What is Plan-Do-Check-Act (PDSA) cycle?

The PDSA Cycle is a systematic series of steps for gaining valuable learning and knowledge for the continual improvement of a product or process. Also known as the Deming Wheel, or Deming Cycle, the concept and application was first introduced to Dr. Deming by his mentor, Walter Shewhart of the famous Bell Laboratories in New York.

The four phases in the Plan-Do-Check-Act Cycle involve:

  • Plan: Identifying and analyzing the problem.
  • Do: Developing and testing a potential solution.
  • Check: Measuring how effective the test solution was, and analyzing whether it could be improved in any way.
  • Act: Implementing the improved solution fully.

14. What type of information is captured in an information security policy?

Information security policies are the documented business and technical rules for protecting an organization from information security risk faced by its business and technical infrastructure. These written policy documents provide a high-level description of the various controls, which the organization will use to manage its information security risks.
The information security policy documents are also considered to be a formal declaration of management’s intent to protect its information asset from relevant risks. In specific cases, the policies are supported by information security procedures that identify key activities required to implement relevant information security policies.

15. What is a balanced scorecard? Balanced scorecard is a strategic planning and management system that is used extensively in business and industry, government, and nonprofit organizations worldwide to align business activities to the vision and strategy of the organization, improve internal and external communications, and monitor organization performance against strategic goals.

Balanced scorecard is a strategic planning and management system that is used extensively in business and industry, government, and nonprofit organizations worldwide to align business activities to the vision and strategy of the organization, improve internal and external communications, and monitor organization performance against strategic goals.

16. What is a Service Request?

Service requests are a formal request submitted by a user for some type of service, software, or hardware. A Service request generally refers to something the user wants and/or needs but does not already have, such as a printer or laptop. Service requests often involve items that are already approved. For instance, if it is a company policy that all employees get access to the cloud-based CRM system, and someone from the marketing department sends a service request for access to the CRM, this does not need any additional approval. The IT help desk can simply fulfill this request.

17. What type of information is stored in a CMDB?

CMDB contains contents that are intended to hold a collection of IT assets commonly referred to as configuration items (CI) as well as descriptive relationships between such assets. When populated, the repository becomes a means of understanding how critical assets such as information systems are composed, what are their upstream sources or dependencies, and what are their downstream targets.

18. Is there a trade-off between return and risk?

According to modern portfolio theory, there is a trade-off between risk and return. All other factors being equal, if a particular investment incurs a higher risk of financial loss for prospective investors, those investors must be able to expect a higher return in order to be attracted to the higher risk.
In majority of cases, even though there is no promise of higher returns on risky assets, so the higher risk just tends to scare off potential investors, keeping the returns on a given investment low. The only investments that can really try to promise higher returns for higher risk are bonds, and even then the higher returns won’t be generated if the issuing organization goes default.

19. What is the difference between end-users and customers?

End-User – An end user or end customer directly receives the service or employs the product. End users are not the only customers as there may be intermediate entities like purchasing departments, whose expectations or needs must be carried forward through a series of service contracts or requirement definitions.
Customer– A customer may or may not have the ability to choose between different products and suppliers. For instance- In monopoly situations like local telephone and cable television services, there are scenarios when end users do not make the purchasing decision. It may include Clients of social service agencies or court-appointed lawyers or employees of an organization where the purchasing department makes the choices.

20. How is IT Service Continuity Management (ITSCM) related to Business Continuity Planning (BCP)?

IT Service Continuity is a subset of Business Continuity Planning (BCP) and encompasses IT disaster recovery planning and wider IT resilience planning. It also incorporates those elements of IT infrastructure and services that relate to communications such as (voice) telephony and data communications.
It is a systematic process to prevent, predict and manage Information and Communications Technology (ICT) disruption and incidents, which have the potential to disrupt ICT services and should result in a more resilient IT service capability aligned to wider organizational requirements.

7. How to check Memory stats and CPU stats as a Linux admin?

Using ‘free’ & ‘vmstat’ command, we can display the physical and virtual memory statistics, respectively. With the help of ‘sar’ command, we can see the CPU utilization & other stats.

8. How to reduce or shrink the size of LVM partition?

Below are the logical steps to reduce size of LVM partition :

  • Unmount the filesystem using unmount command,
  • Use resize2fs command , e.g resiz2fs /dev/mapper/myvg-mylv 10G
  • Now use the lvreduce command as lvreduce -L 10G /dev/mapper/myvg-mylv

The above Command will shrink the size LVM partition and fixes the filesystem size to 10GB.Most in-depth, industry-led curriculum in linux.

9. What are the different modes of Network bonding in Linux?

Below are list of modes used in Network Bonding :

  • balance-rr or 0 – round-robin mode for fault tolerance and load balancing.
  • active-backup or 1 – Sets active-backup mode for fault tolerance.
  • balance-xor or 2 – Sets an XOR (exclusive-or) mode for fault tolerance and load balancing.
  • broadcast or 3 – Sets a broadcast mode for fault tolerance. All transmissions are sent on all slave interfaces.
  • 802.3ad or 4 – Sets an IEEE 802.3ad dynamic link aggregation mode. Creates aggregation groups that share the same speed & duplex settings.
  • balance-tlb or 5 – Sets a Transmit Load Balancing (TLB) mode for fault tolerance & load balancing.
  • balance-alb or 6 – Sets an Active Load Balancing (ALB) mode for fault tolerance & load balancing.

10. How to check and verify the status of the bond interface?

Using the command ‘cat /proc/net/bonding/bond0,’ we can check what mode is enabled and what LAN cards are used in this bond. In this example, we have one one bond interface. However, we can have multiple bond interfaces like bond1, bond2 and so on.

11. How can you enhance the security of password file?

Linux keep user account information in a text file called /etc/passwd. This file also stores one way encrypted password. It is accessed by several tools to get user information, which is a security risk, so file need to ‘Word Readable.’ To minimize the security risk, you can use shadow password format. This method saves account information in regular file /etc/passwd.

However, the password is stored as a single “x” character (not actually stored in this file). A second file, called “/etc/shadow” contains encrypted password as well as other information such as account or password expiration values, etc. The /etc/shadow file is readable only by the root account and is therefore less of a security risk

3. Suppose your FTP Server is hacked and the entire server needs to be restored. How should you restore the original kernel system files?

You cannot restore the entire operating system from tape backup device. So you should reinstall the core operating system, and then restore system configuration files and user data from tape backup device.

14. Why should you avoid Telnet to administer a Linux system remotely?

Telnet uses most insecure method for communication. It sends data across the network in plain text format and anybody can easily find out the password using the network tool. In the case of Telnet, these include the passing of login credentials in plain text, which means anyone running a sniffer on your network can find the information he needs to take control of a device in a few seconds by eavesdropping on a Telnet login session.

15. What is Puppet Server?

Puppet is an open-source & enterprise software for configuration management toll in UNIX like operating system. Puppet is an IT automation software that is used to push configuration to its clients (puppet agents) using code. Puppet code can do multiple tasks from installing new software to checking file permissions to updating user accounts.

16. What is the difference between Cron and Anacron?

1. Minimum granularity with Cron is minute while it is in days with Anacron.

2. Cron job can be scheduled by any normal user while Anacron can be scheduled only by the super user (the superuser is a special user account used for system administration. Depending on the operating system (OS), the actual name of this account might be root,administrator, admin or supervisor)

3. Cron expects the system to be up and running while the Anacron doesn’t expect the system to be up and running all the time. In case of Anacron, if a job is scheduled and the system is down that time, it will execute the job as soon as the system is up and running.

4. Cron is ideal for servers while Anacron is ideal for desktops and laptops.

5. Cron should be used when you want a job to be executed at a particular hour and minute while Anacron should be used in when the job can be executed irrespective of the hour and minute.

17. What command is used to check the number of files, disk space and each user’s defined quota?

repquota command is used to check the status of the user’s quota along with the disk space and number of files used.
This command gives a summary of the user’s quota that how much space and files are left for the user. Each user has a defined quota in Linux. This is done mainly for the security as some users have only limited access to files. This provides a security to the files from unwanted access. The quota can be given to a single user or to a group of users.

18. What is the name and path of the main system log?

By default, the main system log is ‘/var/log/messages’. This file contains all the messages and the script written by the user. By default, all scripts are saved in this file. This is the standard system log file, which contains messages from all system software, non-kernel boot issues, and messages that go to ‘dmesg’. dmesg is a system file that is written upon system boot.

19. Can Linux computer be made a router so that several machines may share a single Internet connection? How?

Yes, a Linux machine can be made a router. This is called “IP Masquerade.” IP Masquerade is a networking function in Linux similar to the one-to-many (1: Many) NAT (Network Address Translation) servers found in many commercial firewalls and network routers.

The IP Masquerade feature allows other “internal” computers connected to this Linux box (via PPP, Ethernet, etc.) to also reach the Internet as well. Linux IP Masquerading allows this functionality even if the internal computers do not have IP addresses.

The IP masquerading can be done by the following steps :

  • The Linux PC must have an internet connection and a connection to LAN. Typically, the Linux PC has two network interfaces-an Ethernet card for the LAN and a dial-up PPP connection to the Internet (through an ISP).
  • All other systems on your LAN use the Linux PC as the default gateway for TCP/IP networking. Use the same ISP-provided DNS addresses on all systems.
  • Enable IP forwarding in the kernel. By default the IP forwarding is not enabled. To ensure that IP forwarding is enabled when you reboot your system, place this command in the /etc/rc.d/rc.local file.
  • Run /sbin/iptables-the IP packet filter administration program-to set up the rules that enable the Linux PC to masquerade for your LAN.

20. How to change window manager by editing your home directory?

“/.xinitrc file” allows changing the window manager we want to use when logging into X from that account. The dot in the file name shows you that the file is a hidden file and doesn’t show when you do a normal directory listing. For setting a window manager we have to save a command in this file.

The syntax of command is : exec window manager . After this, save the file. Next time when you run a startx a new window manager will open and become default.
The commands for starting some popular window managers and desktop environments are :

  • KDE = startkde
  • Gnome = gnome-session.
  • Blackbox = blackbox.
  • FVWM = fvwm
  • Window Maker = wmaker.
  • IceWM = icewm

21. How shadow passwords are given by in Linux?

pwconv command is used for giving shadow passwords. Shadow passwords are given for better system security. The pwconv command creates the file /etc/shadow and changes all passwords to ‘x’ in the /etc/passwd file.

First, entries in the shadowed file which don’t exist in the main file are removed. Then, shadowed entries which don’t have `x’ as the password in the main file are updated. Any missing shadowed entries are added. Finally, passwords in the main file are replaced with `x’. These programs can be used for initial conversion as well to update the shadowed file if the main file is edited by hand.

22. What daemon is used for scheduling of the commands?

The crontab command is used for scheduling of the commands to run at a later time.
SYNTAX

crontab [ -u user ] file

crontab [ -u user ] { -l | -r | -e }

Options
l List – display the current crontab entries.
r Remove the current crontab.
e Edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables.
When user exits from the editor, the modified crontab will be installed automatically. Each user can have their own crontab, and though these are files in /var, they are not intended to be edited directly.
If the –u option is given than the crontab gives the name of the user whose crontab is to be tweaked. If it is given without this then it will display the crontab of the user who is executing the command.

23. What shell does a Linux Administrator assign to a POP3 mail-only account?

POP3 mail only account is assigned to the /bin/false shell. However, assigning bash shell to a POP3 mail only gives user login access, which is avoided. /bin/nologin can also be used. This shell is provided to the user when we don’t want to give shell access to the user. The user cannot access the shell and it rejects shell login on the server as in Telnet. It is mainly for the security of the shells.

POP3 is basically used for downloading mail to mail program. So for illegal downloading of emails on the shell, this account is assigned to the /bin/false shell or /bin/nologin. These both shells are same as they both do the same work of rejecting the user login to the shell.

The main difference between these two shells is that false shell shows the incorrect code and any unusual coding when user login to it. But the nologin shell simply tells that no such account is available. So nologin shell is used often in Linux.

24. If a volume group named VG0 already exists and we need to extend this volume group up to 4GB. How will you do it?

  • Firstly create Physical volume (/dev/sda7) of size 4GB.
  • Now run following command.
    vgextend VG0 /dev/sda7

25. Is there any relation between modprobe.conf file and network devices?

Yes, this file assigns a kernel module to each network device.

For Example :-

[root@localhost ~]# cat /etc/modprobe.conf

alias eth0 b44

Here, b44 is the kernel module for network device eth0.

We can confirm whether this module “b44” is present or not by the following command

[root@localhost ~]# lsmod |grep b44

b44 29005 0

26. What is YUM?

YUM stands for Yellow dog Updater, Modified because it is based on YUP, the Yellow dog Updater. Where does the name Yellow dog come from? Yellow Dog is a version of Linux for the Power Architecture hardware and is RPM-based, just like Red Hat Enterprise Linux and Fedora. YUP, and later YUM, were written by the Linux community as a way to maintain an RPM-based system

27. What is the role of Kudzu?

Kudzu is used to detect new Hardware. RedHat Linux runs a hardware discoverer, named kudzu. When attempting to identify a serial port Kudzu resets the serial port. This stops the serial console. Kudzu is configured from the file/etc/sysconfig/kudzu.
Kudzu can be prevented from resetting hardware, by setting the configuration parameter SAFE to yes.

28. What is the difference between ext2 and ext3 file systems?

  • The ext3 file system is an enhanced version of the ext2 file system.
  • The most important difference between Ext2 and Ext3 is that Ext3 supports journaling.
  • After an unexpected power failure or system crash (also called an unclean system shutdown), each mounted ext2 file system on the machine must be checked for consistency by the e2fsck program. This is a time-consuming process and during this time, any data on the volumes is unreachable.
  • The journaling provided by the ext3 file system means that this sort of file system check is no longer necessary after an unclean system shutdown. The only time a consistency check occurs using ext3 is in certain rare hardware failure cases, such as hard drive failures. The time to recover an ext3 file system after an unclean system shutdown does not depend on the size of the file system or the number of files. Rather, it depends on the size of the journal used to maintain consistency. The default journal size takes almost a second to recover, depending on the speed of the hardware.

29. Explain /proc filesystem?

/proc is a virtual file system that provides detailed information about Linux kernel, hardware and running processes. Files under /proc directory named as Virtual files.
Since /proc contains virtual files, it is called virtual file system. These virtual files have unique qualities. Most of them are listed as zero bytes in size.
Virtual files such as /proc/interrupts, /proc/meminfo, /proc/mounts, and /proc/partitions provide an up-to-the-moment glimpse of the system’s hardware. Others: /proc/filesystems file and the /proc/sys/ directory provide system configuration information and interfaces.

30. How do you create ext4 file system?

# mke2fs -t ext4 /dev/DEV

31. How to Enable ACLs for /home partition?

Add following entry in /etc/fstab
LABEL=/home /home ext3 acl 1 2
Now remount /home partition with acl option.
mount -t ext3 -o acl /dev/sda3 /home

Q #1) What is Android?

Answer: Android is an open source operating system and is mainly popular for Smartphones and Tablets.

This operating system is Linux Kernel based. Using Android operating system, the developer develops the functions or programs which can perform basic as well as the advanced type of operations on the Smartphone.

Q #2) What is Android SDK?

Answer: To develop a mobile application, Android developers require some tools and this requirement is satisfied by “Android SDK” which is a set of tools that are used for developing or writing apps.

It has a Graphical User Interface which emulates the Android environment. This emulator acts as an actual mobile device on which the developers write their code and then debug/test the same code to check if anything is wrong.

Q #3) What are the different versions of Android OS that you remember?

Answer: Given below are the various versions of Android.

Version

Name

Android 8.0

Oreo

Android 7.0 – 7.1.2

Nougat

Android 6 – 6.0.1

Marshmallow

Android 5 – 5.1.1

Lollipop

Android 4.4 – 4.4.4

KitKat

Android 4.1 – 4.3

Jelly Bean

Android 4.0-4.0.4

Ice Cream Sandwich

Q #4) What is the difference between Mobile Application Testing and Mobile Testing?

Answer: Mobile app testing is the testing of applications on a device which mainly focuses on functions and features of the application.

And Mobile Testing is the testing of the actual mobile device and focuses on the mobile features like Call, SMS, Contacts, Media Player, inbuilt browsers etc.

Q #5) Name the languages supported for Android development.

Answer: Java is the widely used language for Android development.

It also supports C/C++ and when used with Android SDK, it improves the performance speed too.

Q #6) What are the advantages of Android Operating System?

Answer: It is an open-source and platform independent. It supports various technologies like Bluetooth, Wi-Fi, etc

Q #7) Explain Android Architecture briefly.

Answer: Android architecture is in the form of software stack components.

The below diagram describes the different layers in the Android architecture.

  • Linux Kernel : Linux Kernel is placed at the bottom of the software stack and is the foundation of the Android architecture. Using Linux kernel, Android provides a connection between the other layers of the software. It helps to develop drivers like the keypad, display, audio for device manufacture etc.
  • Hardware Abstraction Layer (HAL) : HAL provides an interface between device drivers and API framework. It consists of library modules which are specific to the hardware component.
  • Android Runtime : Linux kernel provides multi-tasking execution environment so that multiple processes can execute each process runs on its own instance of Android Runtime (ART). Android has core runtime libraries like Dalvik VM specific libraries, Java Interoperability Libraries, Android Libraries and C/C++ libraries.

Q #8) Define and explain Android Framework.

Answer: Android framework is a set of API’s using which the Android developers write code for the mobile apps. It contains the methods and classes to write the programming code.

Android framework includes a different set of tools to create image pane, text field, buttons, etc. It also includes “Activities” with which the user interacts and “Services”, which are the programs that run in the background. It is a package of different components like Intents, Broadcast Receivers, Content Providers, etc.

Q #9) Which components are necessary for a New Android project?

Answer: Whenever a new Android project is created, the below components are required:

  • manifest: It contains xml file.
  • build/: It contains build output.
  • src/: It contains the code and resource files.
  • res/: It contains bitmap images, UI Strings and XML Layout i.e. all non-code resources.
  • assets/: It contains a file which should be compiled into a .apk file.

Q #10) Provide the important core components of Android.

Answer: The core components of Android operating systems are:

  • Activity
  • Intents
  • Services
  • Content Provider
  • Fragment

Q #11) Explain briefly – what is meant by Activities?

Answer: Activities are the part of the mobile app which the user can see and interact with.

For Example , if you open an SMS app which has multiple activities like create new SMS, add a contact from the address book, write the content in the SMS body, send SMS to the selected contact, etc.

Activity keeps a track of the following:

  • Keeps track of what a user is currently looking for in an app.
  • Keeps a track of previously used processes, so that the user can switch between ongoing process and previous process.
  • It helps to kill the processes so that the user can return to their previous state

An activity is implemented as a subclass of Activity class as shown below:

Public class MyActivity extends Activity
{
}

Q # 12) What is meant by Services?

Answer: Service is an Android component which runs in the background and acts independently. It does not provide any user interface.

Though the services are running behind the scene, a user can continue their work on different apps. Most of the time, the users are not aware of the services which are running in the background. These services allow the system to kill the process without interrupting the user’s ongoing work.

A service is implemented as a subclass of Service class:

Public class MainService extends Service
{
}

Q #13) Explain Activity Lifecycle briefly.

Answer: When a user interacts with the app and moves here and there, out of the app, returns to the app, etc. During all this process “Activity” instances also move in the different stages in their lifecycle.

There are seven different states like – onCreate(), onStart(), onRestart(), onResume(), onPause(), onStop(), and onDestroy(). These are termed as a ‘callback’. Android system invokes these callbacks to know that the state has been changed.

The below-given diagram describes the Activity Lifecycle:

Source

When a user is working on an app, then there are many activities involved in it like Open, Close, Save, Delete, Send, etc.

Based on the user action these activities are partially disconnected from the UI but these activities always reside in the memory so that when the user calls back the same activity, the user will be in the same state where he has left off.

Q #14) What is an Intent?

Answer: 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.

Given below are the two types:

  • Implicit Intents
  • Explicit Intents

Q #15) Explain Implicit and Explicit Intents.

Answer: Implicit Intent calls the system components while explicit Intents invoke the Activity class.

Q #16) What is the importance of setting up permission in app development?

Answer: Once the permissions are set for the app development, then the data and code are restricted to the authorized users only.



If the code is kept without any restriction or if it is accessible to anyone then there are chances of compromise of code which results in defect leakage.

Q #17) What is .apk extension in Android?

Answer: 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 resource file, certificate, manifest file and other code.

APK files are archive files in the zip format with .apk extension.

Q #18) What is the database used for Android platform?

Answer: SQLite is the database that is used for Android platform. It is an open-source, serverless database.

Q #19) What is ANR in Android?

Answer: ANR stands for Application Not Responding. It is a notification or pop-up displayed by the Android platform whenever the application is performing too many functions at a time and if it is suddenly not responding for a long time to the user action.

Q #20) Which are the dialog boxes supported by Android platform?

Answer: Android supports four types of dialog boxes:

  • AlertDialog : It has a maximum of 3 buttons and sometimes AlertDialog includes check boxes and Radio buttons to select the element.
  • ProgressDialog : It displays the progress bar or wheels.
  • TimePickerDialog : Using this dialog box, a user selects the Time.
  • DatePickerDialog : Using this dialog box, a user selects the Date

Q #21) What is ADB?

Answer: Android Debug Bridge (ADB) is a command line tool which performs shell commands.

ADB is used for direct communication between the emulator ports. It gives the direct control of the communication between the emulator instances to the developer.

Q #22) What is ActivityCreator?

Answer: ActivityCreator is a batch file and shell script which was used to create a new Android project. It is now replaced by “Create New Project” in Android SDK.

Q #23) What is Orientation?

Answer: Orientation is the key feature in Smartphones nowadays. It has the ability to rotate the screen between Horizontal or Vertical mode.

Android supports two types of screen Orientations as mentioned below:

  • Portrait : When your device is vertically aligned.
  • Landscape : When your device is horizontally aligned.

setOrientation() is a method using which you can set a screen alignments. HORIZONTAL and VERTICAL are two values which can be set in the setOrientation() method. Whenever there is a change in the display orientation i.e. from Horizontal to Vertical or vice versa then onCreate() method of the Activity gets fired.

Basically, when the orientation of the Android mobile device gets changed then the current activity gets destroyed and then the same activity is recreated in the new display orientation. Android developers define the orientation in the AndroidManifest.xml file.

Q #24) What is AIDL?

Answer: In the Android platform, there are remote methods which facilitate the use of methods from one program to another. To create and implement the remote methods the first step is to define communication interface in AIDL.

AIDL stands for Android Interface Definition Language. It facilitates the communication between the client and service. It also communicates the information through inter-process communication.

For communication between processes, the data is broken down into chunks which are easily understandable by the Android platform.

Q #25) What are the data types supported by AIDL?

Answer: Data Types supported by AIDL are as follows:

  • String
  • List
  • Map
  • charSequence
  • Java data types such as INT, Long, Char, Boolean etc

Q #26) Explain AndroidManifest.xml file and why do you need this?

Answer: Every application must have AndroidManifest.xml file in the root directory. It contains the information about your app and provides the same to the Android system.

The information includes the package name, Android components such as Activity, Services, Broadcast Receivers, Content Providers, etc. Every Android system must have this information before running any app code.

AndroidManifest.xml file performs the following tasks:

  • It provides a name to the Java package and this name is a unique identifier for the application.
  • It describes the various components of the application which include Activity, Services, Content Providers, etc. Also, it defines the classes which implement these components.
  • It is responsible to protect the application and it declares the permission for accessing the protected part of the app.
  • It also declares the Android API which is going to be used by the application.
  • It contains the library file details which are used and linked to the application.

Q #27) What all devices have you worked on?

Answer: There are many mobile devices available in the market with different operating systems.

Specifically, I have worked on Android, Windows, Symbian, iPhone, etc

Q #28) Which tools are used for debugging on the Android platform?

Answer: To understand the cause of the failure or cause of any issue, debugging is important. On the Android platform Android Monitor.bat utility is used while on iOS platform, iPhone Configuration utility is used for debugging purposes.

There are different tools for debugging which include – Android DDMS, Android Debug Bridge, iOS simulator, Debugging from Eclipse with ADT, Remote debugging on Android with Chrome etc.

Q #29) Which scenario can test only on real devices but not on emulator?

Answer: Emulators are used for performing similar kind of testing which is performed on the real devices. Basically, emulators are used as a replacement for real devices as sometimes real devices are not available for testing, use of real mobile devices for testing purpose is costlier at times.

But there are few scenarios which cannot be tested using emulator, these can be tested only using real devices. These scenarios are interrupted scenarios i.e. message, phone call interruption while using the app, low battery, Bluetooth, memory card mount and unmount etc.

Q #30) Name the mobile automation tools that are available in the market.

Answer: There are quite a few mobile automation testing tools that are available in the market but these are used only if the project requires it and if the application supports the automation.

These tools are paid as well as free tools, hence analysis needs to be done within the project team and then the appropriate mobile automation tool needs to be selected. Silk Mobile, SeeTest, Ranorex are the paid mobile automation tool while Appium, KIF, Robotium, Calabash are few free tools.

Q #31) How do you troubleshoot android application which is crashing frequently?

Answer: Given below are the few steps that we need to follow while troubleshooting the crashing issue:

  • Free up memory space : There is only a limited space available on the mobile devices for mobile apps. To avoid crashing issue or memory related issue, you need to first check the memory space.
  • Clear app data usage : You can clear the app data using the Application Manager under “Settings”. This will clear the cache memory and allow some free space to install another app or it will boost up your current app.
  • Memory Management : Some apps run perfectly on one type of mobile device but the same app may not work on another type of device as for such devices the processing power, memory management, and CPU speed is different. For any app to run properly on any type of mobile device, you should manage the memory on the device.
  • Compatibility issue : It is always not possible to test mobile app on all mobile devices, browsers, operating systems etc. So you need test your mobile app on as many mobile devices as you can in order to avoid any compatibility issue.

Q #32) How do you find memory leaks in the mobile app on Android platform?

Answer: Android Studio is using Android Device Manager (ADM), this ADM is used to detect the memory leaks in the Android platform.

When you open ADM in the Android Studio then on the left-hand side of the ADM, you will find your device or emulator in which a heap sign will be displayed. When you are running any mobile app then you will see the heap size, memory analysis and other statistics displayed on it.

Q #33) What is DDMS?

Answer: Android Studio has debugging tools known as DDMS i.e. Dalvik Debug Monitor Server.

It has wide debugging features which include:

  • Port forwarding services.
  • Screen capture on the device.
  • Thread and Heap information.
  • Incoming call and SMS spoofing.
  • Logcat
  • Radio state information.
  • Location data spoofing.

DDMS is integrated with the Android studio. To launch the DDMS, you need to open Android Device Monitor (ADM) first and then click on the DDMS menu button. Once DDMS is launched, then on the left-hand side the list of connected devices are displayed along with the processes which are running on each device.

With the help of DDMS, you can debug both on real devices and emulators.

Q #34) What are the different data storage options available on the Android platform?

Answer: Android platform provides a wide range of data storage options. These options must be used based on the need such as data is secure and used with the permission only or can be accessed publicly.

Below is the list of data storage options on the Android platform:

  • SharedPreference : It stores data in XML files. It is the simplest way to store private data in the key-value pair.
  • SQLite : It stores structure data in the private database.
  • Internal Storage : It stores data in the device file system and any other app cannot read this data.
  • External Storage : Data is stored in the file system but it is accessible to all apps in the device

Q #35) Explain Sensors in Android.

Answer: Android-enabled devices have built-in Sensors which measures Orientation, Motion and other conditions.

These sensors provide data with high accuracy, which will help to monitor positioning and movement of the device. Some of the sensors are hardware based and few are software based.

There are three categories of sensors as mentioned below:

  • Motion Sensors : These sensors measure the rotational & acceleration forces and it includes gravity sensors, rotational vector sensor, accelerometers, etc.
  • Environmental Sensors : It measures air temperature, pressure, humidity, etc.
  • Position Sensors : It measures the physical position of the device and includes orientation sensors and magnetometers.

There are four types of Java Classes as shown below:

  • Sensor Manager
  • Sensor
  • SensorEvent
  • SensorEventListener

Source: Contents are provided by Technicalsymposium Google Group Members.
Disclaimer: All the above contents are provided by technicalsymposium.com Google Group members.
Further, this content is not intended to be used for commercial purpose. Technicalsymposium.com is not liable/responsible for any copyright issues.

Technical Symposium.Com All Jobs & Certifications
Lecture Notes and Scholarships & Project Details

Fresher Jobs Details
job detailsAll Fresher Software Jobs Details
job detailsAll Government Jobs Details
job detailsAll Internships Details
job detailsOff-Campus Interviews/Walk-in Details
job detailsAll Competitive Exam Details
job detailsBank Clerk/Officers Jobs Details
job detailsB.Sc/M.Sc Graduate Fresher Jobs
job detailsAll Technical Jobs Details
job detailsAll State/Central Government Jobs Details
Conference/Symposium Details
job detailsAll International Conference Details
job detailsAll National Conference Details
job detailsAll Symposium/Workshop Details
job detailsUniversity Conferences Details
job detailsIIT/NIT/IIM Conference Details
job detailsComputer Science Conference Details
job detailsElectronics Conferences Details
job detailsMechanical Conferences Details
job detailsAll Latest Conferences Details
Calendar of Events Details
job detailsJanuary – List of All Event Details
job detailsFebruary – List of All Event Details
job detailsMarch– List of All Event Details
job detailsApril – List of All Event Details
job detailsMay – List of All Event Details
job detailsJune – List of All Event Details
job detailsJuly – List of All Event Details
job detailsAugust – List of All Event Details
job detailsAll Months - List of All Events Details
GATE Question Papers & Syllabus
job detailsAll GATE Previous Year Question Papers
job detailsGATE Syllabus for All Branches
job detailsGATE-Computer Science Question Papers
job detailsGATE – Mechanical Question Papers
job detailsGATE – ECE Question Papers
job detailsGATE- EEE Question Papers
job detailsGATE – Civil Engineering Question Papers
job detailsGATE – All Branches Question Papers
job detailsGATE Exam Pattern Details
IES Question Papers & Syllabus
job detailsIES Complete Information
job detailsIES Previous Year Question Papers
job detailsIES Syllabus for All Branches
job detailsIES – Mechanical Question Papers
job detailsIES - E & T Question Papers
job detailsIES - EEE Question Papers
job detailsIES -Civil Engineering Question Papers
job detailsIES - All Branches Question Papers
job detailsIES - Exam Pattern Details
All Companies Placement Materials
job detailsTCS Placement Papers
job detailsWIPRO Placement Papers
job detailsZOHO Placement Papers
job detailsCTS Placement Papers
job detailsINFOSYS Placement Papers
job detailsARICENT Placement Papers
job detailsSBI Placement Papers
job detailsRRB Placement Papers
job detailsBANK/IBPS Placement Papers
Aptitude Round Materials
job details Problem on Numbers
job detailsProblem on Trains
job detailsTime and Work
job detailsSimple Interest
job detailsAptitude Short- Cut Formulas
job detailsAptitude Tricks
job detailsOdd Man Out Series
job detailsSimplification Problems
job detailsProfit & Loss
Technical Round Materials
job detailsJAVA Technical Round Q & A
job detailsC Technical Round Q & A
job detailsC++ Technical Round Q & A
job detailsASP.NET Technical Round Q & A
job detailsData Structure Technical Round Q & A
job detailsSQL Technical Round Q & A
job detailsC# Technical Round Q & A
job detailsPHP Technical Round Q & A
job detailsJ2EE Technical Round Q & A
Software Programs and Lab Manuals
job detailsSurvey Lab Manuals
job detailsCAD/CAM Lab Manuals
job detailsOOPS/C++ Lab Manuals
job detailsJAVA/Internet Programming Manuals
job detailsList of All C Programs with Source Code
job detailsList of All Data Structure Programs
job detailsC Aptitude Programs
job detailsMicroprocessor & Micro Controller Manuals
job detailsAll Engineering Branches Lab Manuals
Anna University Syllabus & Question Papers
job detailsB.E/B.Tech Previous Year Question Papers
job detailsBE-Computer Science Syllabus
job detailsBE-Mechanical Engineering Syllabus
job detailsBE-Civil Engineering Syllabus
job detailsBE-ECE Syllabus
job detailsBE-EEE Syllabus
job detailsMBA/MCA Syllabus
job detailsBE-Aeronautical Engineering Syllabus
job detailsBE-Biomedical Syllabus
IBPS/Bank Syllabus & Question Papers
job detailsIBPS Clerk Exam Syllabus
job detailsIBPS Clerk Question Papers
job detailsIBPS Probationary Officers Syllabus
job detailsIBPS PO Question Papers
job detailsIBPS RRB Exam Syllabus
job detailsIBPS Special Officers Exam Syllabus
job detailsSBI Clerk/PO Syllabus
job detailsAll Private Banks PO/Clerk Syllabuses
job detailsAll Nationalized Bank Po/Clerk Syllabuses
Civil Engineering Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsSeventh Semester Lecture Notes
job detailsEighth Semester Lecture Notes
job detailsLab Manuals
Mechanical Engineering Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsSeventh Semester Lecture Notes
job detailsEighth Semester Lecture Notes
job detailsLab Manuals
Computer Science Engineering Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsSeventh Semester Lecture Notes
job detailsEighth Semester Lecture Notes
job detailsLab Manuals
MCA Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsSeventh Semester Lecture Notes
job detailsEighth Semester Lecture Notes
job detailsLab Manuals
MBA Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsSeventh Semester Lecture Notes
job detailsEighth Semester Lecture Notes
job detailsLab Manuals
ECE Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsSeventh Semester Lecture Notes
job detailsEighth Semester Lecture Notes
job detailsLab Manuals
EEE Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsSeventh Semester Lecture Notes
job detailsEighth Semester Lecture Notes
job detailsLab Manuals
Biotechnology Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsSeventh Semester Lecture Notes
job detailsEighth Semester Lecture Notes
job detailsLab Manuals
Chemical Engineering Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsSeventh Semester Lecture Notes
job detailsEighth Semester Lecture Notes
job detailsLab Manuals
Biomedical Engineering Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsSeventh Semester Lecture Notes
job detailsEighth Semester Lecture Notes
job detailsLab Manuals
Aeronautical Engineering Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsSeventh Semester Lecture Notes
job detailsEighth Semester Lecture Notes
job detailsLab Manuals
B.Sc (All Major Branches) Lecture Notes
job detailsMaths / Statistics Lecture Notes
job detailsPhysics Lecture Notes
job detailsChemistry Lecture Notes
job detailsElectronics Lecture Notes
job detailsComputer Science/IT Lecture Notes
job detailsAgriculture Lecture Notes
job detailsBiotechnology/Biomedical Lecture Notes
job detailsNursing Lecture Notes
job detailsFashion Technology Lecture Notes
M.Sc (All Major Branches) Lecture Notes
job detailsComputer Science/IT Lecture Notes
job detailsAgriculture Lecture Notes
job detailsBiotechnology/Biomedical Lecture Notes
job detailsNursing Lecture Notes
job detailsFashion Technology Lecture Notes
job detailsMaths / Statistics Lecture Notes
job detailsPhysics Lecture Notes
job detailsChemistry Lecture Notes
job detailsElectronics Lecture Notes
B.Com/M.Com Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsLab Manuals
job detailsCommerce Placement Materials
job detailsCommerce Placement Materials
BBA Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsLab Manuals
job detailsPlacement MaterialsEighth Semester Lecture Notes
job detailsFresher Jobs Details
BCA Lecture Notes
job detailsFirst Semester Lecture Notes
job detailsSecond Semester Lecture Notes
job detailsThird Semester Lecture Notes
job detailsFourth Semester Lecture Notes
job detailsFifth Semester Lecture Notes
job detailsSixth Semester Lecture Notes
job detailsLab Manuals
job detailsPlacement Materials
job detailsFresher Jobs Details

Hosting by Yahoo!

About-Us    Contact-Us    Site-map

©copyright All rights are reserved to technicalsymposium.com