package Ġxyz . may ah iro . ex op layer manage ments ample Ċ Ċ import Ġandroidx . lifecycle . Lifecycle Ċ import Ġandroidx . lifecycle . Lifecycle Observer Ċ import Ġandroidx . lifecycle . On Lifecycle Event Ċ import Ġxyz . may ah iro . ex op layer manage ments ample . player . Player Manager Ċ Ċ class ĠMy Lifecycle Observer Ġ: ĠLifecycle Observer Ġ{ ĊĠĠĠ Ġ@ On Lifecycle Event ( Lifecycle . Event . ON _ CREATE ) ĊĠĠĠ Ġfun ĠonCreate () Ġ{ ĊĠĠĠĠĠĠĠ Ġ// Ġ æľĢ åĪĿ ãģ® 1 åĽŀ ãģ® ãģ¿ ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ On Lifecycle Event ( Lifecycle . Event . ON _ START ) ĊĠĠĠ Ġfun ĠonStart () Ġ{ ĊĠĠĠĠĠĠĠ Ġ// Ġ ãĤ¢ãĥĹãĥª éĸĭå§ĭ æĻĤ Ġor Ġãĥ Ĳ ãĥĥãĤ¯ ãĤ°ãĥ© ãĤ¦ ãĥ³ãĥī ãģĭãĤī ãģ® å¾ © å¸ ° æĻĤ ĊĠĠĠĠĠĠĠ ĠPlayer Manager . play All Player () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ On Lifecycle Event ( Lifecycle . Event . ON _ RE SU ME ) ĊĠĠĠ Ġfun Ġon Resume () Ġ{ ĊĠĠĠĠĠĠĠ Ġ// Ġ ãĤ¢ãĥĹãĥª éĸĭå§ĭ æĻĤ Ġor Ġãĥ Ĳ ãĥĥãĤ¯ ãĤ°ãĥ© ãĤ¦ ãĥ³ãĥī ãģĭãĤī ãģ® å¾ © å¸ ° æĻĤ ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ On Lifecycle Event ( Lifecycle . Event . ON _ PAUSE ) ĊĠĠĠ Ġfun Ġon Pause () Ġ{ ĊĠĠĠĠĠĠĠ Ġ// Ġ ãĤ¢ãĥĹãĥª çµĤ äºĨ æĻĤ Ġor Ġãĥ Ĳ ãĥĥãĤ¯ ãĤ°ãĥ© ãĤ¦ ãĥ³ãĥī ç§» è¡Į æĻĤ ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ On Lifecycle Event ( Lifecycle . Event . ON _ STOP ) ĊĠĠĠ Ġfun Ġon Stop () Ġ{ ĊĠĠĠĠĠĠĠ Ġ// Ġ ãĤ¢ãĥĹãĥª çµĤ äºĨ æĻĤ Ġor Ġãĥ Ĳ ãĥĥãĤ¯ ãĤ°ãĥ© ãĤ¦ ãĥ³ãĥī ç§» è¡Į æĻĤ ĊĠĠĠĠĠĠĠ ĠPlayer Manager . pause All Player () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ On Lifecycle Event ( Lifecycle . Event . ON _ DESTROY ) ĊĠĠĠ Ġfun Ġon Destroy () Ġ{ ĊĠĠĠĠĠĠĠ Ġ// Ġ åĳ¼ ãģ° ãĤĮ ãģªãģĦ ĊĠĠĠ Ġ} Ċ } Ċ