Andriod Difference Interview Questions

What is a NinePatch (9-patch) image?

It is a resizable bitmap resource that can be used for backgrounds or other s on a device. NinePatch class permits drawing a bitmap in nine sections. The 9-patch s have an extension as .9.png. It allows extensions 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.

andriod difference interview questions

Why cannot you run the 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; build tools will care for the generation of DVM compatible files.

Master Most in Demand Skills Now !

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

There are a number of methods, but the ones that tend to have the most impact are:

  • 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 optimize.
  • Q What is the significance of the .dex file?Â

    The various Android programs and their implementation strategies form an integral part of Android team lead interview questions. A .dex file (Dalvik Executable file) compiles Android programs which are then zipped into a .apk file. A .dex file is created by translating compiled Java applications and optimized for efficient storage.

    DDMS stands for Dalvik Debug Monitor Server. It is a debugging tool in the Android system that offers the following array of debugging features:

  • Incoming call, SMS, and location data spoofing
  • Port forwarding services
  • Logcat
  • Screen capture on the device
  • Thread and heap information
  • Network traffic tracking
  • Q What is Android Debug Bridge?

    Android Debug Bridge is a command-line tool. It is used to communicate with the emulator instance. ADB controls your device over USB from a computer, installs and uninstalled apps, copies files back and forth, and more. It is a client-server program that incorporates three components: client, server, and daemon.

    Q1 What are broadcast receivers? How is it implemented?

  • Broadcast Receiver is a mechanism using which host application can listen for System level events.
  • Broadcast receiver is used by the application whenever they need to perform the execution based on system events. Like listening for Incoming call, sms etc.
  • Broadcast receivers helps in responding to broadcast messages from other application or from the system.
  • It is used to handle communication between Android operating system and applications.
  • It is implemented as a subclass of BroadcastReceiver class and each message is broadcaster as an Intent object.

    How would you create a multi-threaded Android app without using the Thread class?

    If you only need to override the run() method and no other Thread methods, then you should implement Runnable.

    In particular, be on the lookout for an Android developer demonstrating an understanding that you should only extend from a class when you need to modify some of its functionality.

    28) How can the 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 workings of the codes can be placed, so that the main thread runs with minimal periods of unresponsive times.

    Android Developer Interview Questions with Answer Examples

    Related Posts

    Leave a Reply

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