package Ġcom . news . android . him an shu . new spin . util Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . net . Connectivity Manager Ċ import Ġcom . news . android . him an shu . new spin . App ĊĊ Ċ fun Ġis Net Connected () Ġ: ĠBoolean { ĊĠĠĠ Ġval Ġcm Ġ= ĠApp . getInstance (). application Context . getSystem Service ( Context . CONNECT IVITY _ SERVICE ) Ġas ĠConnect ivity Manager ĊĠĠĠ Ġval Ġactive Network Ġ= Ġcm . active Network Info ĊĠĠĠ Ġreturn Ġactive Network Ġ!= Ġnull Ġ&& Ġactive Network . isConnected Ċ }