Chapter 4: Activities
Name: June Kenneth Ivan T. Castillo Program/Block: BSInfoTech3A
1. Write the correct syntax in extending the Thread class and implement a run method.
2. List the different service lifecycle methods.
onCreate ()
onStartCommand (Intent, int, int)
onDestroy ()
onBind (Intent)
onStartCommand ()
START_STICKY
START_NOT_STICKY
START_REDELIVER_INTENT
3. Write the correct syntax in registering a service in the android manifest life.
4. Create an alert dialog by calling the create() method of the builder class.
5. Create a NotificationCompat.Builder named sampleBuilder.
6. Differentiate Handler from AsyncTask.
Handler is background threads that provide you to communicate with UI. It handles
and schedules messages and runnables sent from background threads to the app
main thread. Whereas AsyncTask provides a simple method to handle background
threads in order to update the UI without blocking it by time consuming operations.s