Android Programming and Technical Programming Technical

Every application will have by default one thread. True or false?

Options
1) false, by default no threads available for a given application
2) True, always any given application will have default one main thread.
3) True, but it is not always, some times it may not have any thread.
4) both 2 and 3

Read Solution (Total 1)

Android Other Question

How to monitor service connection status in bound services?

Options
1) using isServiceConnected(), it returns true if service is connected
2) using onServiceDisConnected(), this function will be called if connection is broken
3) client can keep polling to service if it is available or not.
4) using ServiceConnection class.
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.