package Ġcom . ex mp le . core lib . utils Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . net . Connectivity Manager Ċ import Ġandroid . net . Network Info Ċ import Ġandroid . os . Environment Ċ import Ġcom . ex mp le . core lib . base . Lib Application ĊĊ Ċ /** Ċ Ġ* Ġæĺ¯åĲ¦ æľī SD åį¡ Ċ Ġ*/ Ċ fun Ġhas Sd card (): ĠBoolean Ġ{ ĊĠĠĠ Ġval Ġstate Ġ= ĠEnvironment . get External Storage State () ĊĠĠĠ Ġreturn Ġstate Ġ== ĠEnvironment . MEDIA _ MOUNT ED Ċ } Ċ Ċ /** Ċ Ġ* ĠæŁ¥ çľĭ ç½ĳç»ľ æĺ¯åĲ¦ è¿ŀæİ¥ Ċ Ġ*/ Ċ fun Ġis Connected (): ĠBoolean Ġ{ ĊĠĠĠ Ġval Ġinfo Ġ= Ġget Active Network Info ( Lib Application . mContext ) Ġ?: Ġreturn Ġfalse ĊĠĠĠ Ġreturn Ġinfo . isConnected Ċ } Ċ Ċ private Ġfun Ġget Active Network Info ( context : ĠContext ): ĠNetwork Info ? Ġ{ ĊĠĠĠ Ġval Ġcm Ġ= Ġcontext . getSystem Service ( Context . CONNECT IVITY _ SERVICE ) Ġas ĠConnect ivity Manager ĊĠĠĠ Ġreturn Ġcm . active Network Info Ċ } Ċ