package Ġcom . example . z om ato . util Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . net . Connectivity Manager Ċ Ċ class ĠInternet Check ( private Ġval Ġcontext : ĠContext ) Ġ{ ĊĠĠĠ Ġfun Ġis Connected (): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcm Ġ= Ġcontext . getSystem Service ( Context . CONNECT IVITY _ SERVICE ) Ġas ĠConnect ivity Manager ĊĠĠĠĠĠĠĠ Ġreturn Ġcm . active Network Info Ġ!= Ġnull Ġ&& Ġcm . active Network Info !!. isConnected ĊĠĠĠ Ġ} Ċ }