package Ġcom . cl . wan android . util Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . Intent Ċ import Ġandroid . net . Connectivity Manager Ċ import Ġandroid . os . Build Ċ import Ġandroid . provider . Settings Ċ import Ġcom . cl . wan android . Wan Android Application Ċ Ċ fun Ġis Network Connect (): ĠBoolean Ġ{ ĊĠĠĠ Ġval Ġcm Ġ= ĊĠĠĠĠĠĠĠ ĠW an Android Application . context . getSystem Service ( Context . CONNECT IVITY _ SERVICE ) Ġas ĠConnect ivity Manager ĊĠĠĠ Ġreturn Ġif Ġ( Build . VERSION . SDK _ INT Ġ<= ĠBuild . VERSION _ CODES . Q ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcm . active Network Info ?. is Available Ġ?: Ġfalse ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠ Ġcm . get Network Capabilities ( cm . active Network ) Ġ!= Ġnull ĊĠĠĠ Ġ} Ċ } Ċ Ċ fun Ġto Network Setting ( context : ĠContext ) Ġ{ ĊĠĠĠ Ġval Ġintent Ġ= ĠIntent ( Settings . ACTION _ WIFI _ SETTINGS ) ĊĠĠĠ Ġcontext . startActivity ( intent ) Ċ }