This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What is JobScheduler? |
|
Answer» The JobSchedular API is used for scheduling different types of jobs against the framework that will be executed in your app’s own process. This allows your application to perform the given task while being considerate of the device’s battery at the cost of timing control. The JobScheduler supports batch scheduling of jobs. The Android system can combine jobs for reducing battery consumption. JobManager automatically handles the network unreliability so it makes handling uploads easier. Here is some example of the situation where you would use this job scheduler:
Android system gives a platform for a developer from which they can display the applications to the smartphone users and find potential customers out of them. It ALSO PROVIDES PAID and free applications for the users that could secure their DATA serves as a platform for information and gives various services as per the needs of the customers. |
|
| 2. |
Explain about java classes related to the use of sensors on Android. |
|
Answer» Android sensor API provides many classes and interface for the use of sensors on Android. The important classes and interfaces of sensor API are given below:
|
|
| 3. |
What is the difference between compileSdkVersion and targetSdkVersion? |
|
Answer» compileSdkVersion:
targetSdkVersion:
|
|
| 4. |
What is the significance of the .dex file? |
|
Answer» Android programs are compiled into a .dex file (Dalvik Executable file) by DVM, which are then zipped into a .apk file on the DEVICE. .dex files are CREATED by translating compiled applications written in java. .dex is a format that is optimized for EFFECTIVE storage and memory-mappable EXECUTIONS. |
|
| 5. |
What is the content provider? How it is implemented? |
|
Answer» Content provider is ONE of the primary BUILDING blocks of Android applications, which manages access to a central repository of data. It acts as a standard interface that connects data in one process with code running in another process. So it can be used to share the data between different applications. They are responsible for encapsulating the data and providing mechanisms for defining data security. It is implemented as a subclass of ContentProviderclass and must implement a set of APIs that will ENABLE other applications to PERFORM transactions. public class MyContentprovider extends CONTENTPROVIDER { public void onCreate(){}} |
|
| 6. |
What are the differences between Service and Thread? |
||||||||
|
Answer» The main difference between Service and THREAD is given below:
|
|||||||||
| 7. |
What database is used in Android? How it is different from client-server database management systems? |
|
Answer» SQLite is the open-source RELATIONAL database used in ANDROID. The SQLite engine is serverless, transactional, and also self-contained. Instead of the client-server relationship of most database management systems, the SQLite engine is integrally LINKED with the APPLICATION. The library can be called dynamically and it can make use of simple function CALLS that reduce latency in database access. |
|
| 8. |
What is the difference between Serializable and Parcelable? Which is the best approach in Android? |
|
Answer» While developing applications usually it needs to transfer data from one ACTIVITY to another. This data needs to be added into a CORRESPONDING INTENT object. Some additional actions are required to make the data suitable for transfer. For doing that the object should be either serializable or parcelable. Serializable:
Parcelable:
|
|
| 9. |
Explain in detail about the important file and folders used when you create a new Android application. |
|
Answer» App: It DESCRIBES the basic characteristics of the application and defines each of its components. java:
res:
Scripts: This is an auto-generated file that consists of compileSdkVersion, buildToolsVersion, minSdkVersion, targetSdkVersion, applicationId, versionCode, and versionName. For example, build.gradle is a script file placed in the root project directory, defines build configurations that will be APPLIED to all modules in your project. |
|
| 10. |
What are broadcast receivers? How is it implemented? |
|
Answer» A broadcast receiver is a mechanism USED for LISTENING to system-level events like listening for incoming calls, SMS, etc. by the HOST APPLICATION. It is implemented as a subclass of BroadcastReceiver CLASS and each message is broadcasted as an intent object. public class MyReceiver extends BroadcastReceiver { public void onReceive(context,intent){}} |
|