Following quiz provides Multiple Choice Questions (MCQs) related to Android. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - What is a context in android ?
Context is used to create new components or objects like views and it is used to start activity and services. Android has two kinds of contexts and those are getContext() and getApplicationContext().
Q 2 -How to move services to foreground in android?
We have to call startFordgroud(int id,Notification notification) to make services as foreground services. When it comes to foreground, it will show a notification.
Q 3 -What are the functionalities of Binder services in android?
Binder is responsible to manage the thread while creating aidl and is responsible to do marshalling and un-marshalling of the data. Binders have sub functionalities and interface for clients
Q 4 - What is the life cycle of broadcast receivers in android?
Broadcast receiver has only onReceive() method. Broadcast starts from onRecieve() and control comes out from onRecieve().
Q 5 - What is an anonymous class in android?
Anonymous class doesn't have class name but has some functionalities in it.
Q 6 - WHich method is used to find GPS enabled or disabled pro-grammatically in android?
The onProviderDisable() method is used to find whether GPS is enabled or disabled in android pro-grammatically
Q 7 - What does httpclient.execute() returns in android?
Httpclient.execute() executes only once and it will return http response from the server or device, Http entity is embedded the body of the Http response.
Q 8 - What is a GCM in android?
Using with google could messaging, we can push the data from the servers to client devices. In short, we can send messages to mobile devices through the cloud(Push Notification).
ANR responding time is 5 sec. If an application is not responding within 5 sec, ANR will occur
Q 10 - How do you join two notifications in android?
Give same id for both notifications.