java - Need assistance checking to see if a value is -1 -


i need check see if value -1. i'm having trouble bit of source code i've compiled , i'm not sure how resolve issue here.

i know need implement:

if(wifimanager.addnetwork(conf) == -1) {     // insert code handle failure here. } else {     // rest of code 'success' case here! } 

but i'm not sure should insert handle failure.

you can comparing result of wifimanager.addnetwork(conf); in if statement...

if(wifimanager.addnetwork(conf) == -1) {     // insert code handle failure here. } else {     // rest of code 'success' case here! } 

i'm assuming working android's wifimanager.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -