Seems like WifiNetwork.SSID can sometimes be null (WiFiKeyShare 1.1 on Samsung Galaxy S6):
E/AndroidRuntime( 8372): FATAL EXCEPTION: AsyncTask #1
E/AndroidRuntime( 8372): Process: be.brunoparmentier.wifikeyshare, PID: 8372
E/AndroidRuntime( 8372): java.lang.RuntimeException: An error occured while executing doInBackground()
E/AndroidRuntime( 8372): at android.os.AsyncTask$3.done(AsyncTask.java:304)
E/AndroidRuntime( 8372): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
E/AndroidRuntime( 8372): at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
E/AndroidRuntime( 8372): at java.util.concurrent.FutureTask.run(FutureTask.java:242)
E/AndroidRuntime( 8372): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
E/AndroidRuntime( 8372): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/AndroidRuntime( 8372): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/AndroidRuntime( 8372): at java.lang.Thread.run(Thread.java:818)
E/AndroidRuntime( 8372): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference
E/AndroidRuntime( 8372): at be.brunoparmentier.wifikeyshare.model.WifiNetwork.getSsidFromWifiConfiguration(WifiNetwork.java:76)
E/AndroidRuntime( 8372): at be.brunoparmentier.wifikeyshare.model.WifiNetwork.fromWifiConfiguration(WifiNetwork.java:66)
E/AndroidRuntime( 8372): at be.brunoparmentier.wifikeyshare.ui.activities.WifiListActivity$WifiListTask.doInBackground(WifiListActivity.java:313)
E/AndroidRuntime( 8372): at be.brunoparmentier.wifikeyshare.ui.activities.WifiListActivity$WifiListTask.doInBackground(WifiListActivity.java:297)
E/AndroidRuntime( 8372): at android.os.AsyncTask$2.call(AsyncTask.java:292)
E/AndroidRuntime( 8372): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
E/AndroidRuntime( 8372): ... 4 more
Seems like
WifiNetwork.SSID
can sometimes benull
(WiFiKeyShare 1.1 on Samsung Galaxy S6):Trying to get more info from user.