What is the difference between intent, sticky intent, and pending intent?
Options
1) intent - is a message passing mechanism between components of android; Sticky Intent - Sticks with android, for future broad cast listeners; Pending Intent - Will be used when some one wants to fire an intent in future.
2) intent - is a message passing mechanism between components of android except for Content Provider; Sticky Intent - Sticks with android, for future broad cast listeners; Pending Intent - Will be used when some one wants to fire an intent in future.
3) intent - is a message passing mechanism between components of android except for content Provider;
Sticky Intent - Sticks with android, for future broad cast listeners; Pending Intent - Will be used when some one wants to fire an intent in future and may be at that time that app is not alive.
4) same as 3rd option, but sticky and pending intent are same.
What will happen if a sensor is not unregistered, after using it for some time?
Options
1) Android will automatically switch off that sensor and stops it.
2) Nothing will happen, but that sensor will keep running in background, with this no side-effect occurs.
3)that sensor will keep running in the background, and consumes lot of battery power un-necessarily.
4) Program will crash
What is the difference between broadcast receiver and a service?
Options
1) BroadReceiver - is like gateway for other components, can do small back ground functionality with in 10 seconds. Services - can do long running operation in the background with out having UI, and no time limit for it.
2) Service - is like gateway for other components, can do small background functionality with in 10 seconds. BroadcastReceiver - can do long running operation in the background with out having UI, and no time limit for it.
3) Option 1 is right, but both receiver and service both can interact with UI if they want to. Broadcast Receivers have time limit of 10 seconds, and they respond to broadcasted messages.
4) Option 1 is right, but a service can interact with UI if it wants. Its not mandatory that service should not have UI.
What is the difference between thread and handler thread, in android?
Options
1) Thread will have looper and Message Queue. Default this looper will be prepared to handle incoming messages from other threads.
2) Handler thread will have looper and MessageQueue, but looper is prepared to handle incoming message.
3) Both are same. No difference, but HandlerThread is sub class of Thread class.
4) Both are same. No difference, But HandlerThread is super class of Thread class.
What is the purpose of SQLiteOpentHelper?
Options
1) A helper class to manage database creation, version management, and inserting/modifying/deleting/updating table data without loosing state of the previous data.
2)A helper class to insert/update/delete data into tables with loosing state of the previous data.
3)A helper class to manage database creation, upgrading and version management without loosing state of the previous data.
4) all of the above
What is the tool to convert images to 9 patch image? where it will be located?
Options
1) draw9patch is the tool name, it is located in android-sdk/platform-tools.
2) draw9patch is the tool name, it is located in android-sdk/tools
3)9patch is the tool name, it is located in android-sdk/platform-tools
4)9patch is the tool name, it is located in android-sdk/tools
Options
1) yes every thread by default will have looper
2) no only handler threads will have loopers
3) only handler threads will have loopers, but we can prepare normal threads looper also.
4) only main thread will have looper
Trigger broadcast receiver only if my activity is in memory, else it should not get triggered, how to do it?
Options
1) Send broadcast only when your activity is alive
2) Register a dynamic receiver in that Activity
3) Register a static receiver in manifest file
4) It is not possible to achieve