package Ġcom . pal tab rain Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . net . Connectivity Manager Ċ import Ġandroid . net . Network Info Ċ Ċ object ĠUtils Ġ{ ĊĊĠĠĠ Ġfun Ġis Network Connected ( context : ĠContext ) Ġ: ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcm Ġ= Ġcontext . getSystem Service ( Context . CONNECT IVITY _ SERVICE ) Ġas ĠConnect ivity Manager ĊĠĠĠĠĠĠĠ Ġval Ġactive Network : ĠNetwork Info ? Ġ= Ġcm . active Network Info ĊĠĠĠĠĠĠĠ Ġreturn Ġactive Network ?. isConnected Or Connecting Ġ== Ġtrue ĊĠĠĠ Ġ} Ċ }