jannispinter / jaws

JAWS - Just another wifi scanner
GNU General Public License v3.0
42 stars 6 forks source link

Android 6: Need ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to get scan results #13

Closed stubb closed 8 years ago

stubb commented 8 years ago

Jaws 0.4 crashs on Android 6 during the application start because the app permissions are not set correctly:

11-15 09:46:46.244    4006-4006/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: is.pinterjann.jaws, PID: 4006
    java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.wifi.SCAN_RESULTS flg=0x4000010 (has extras) } in is.pinterjann.jaws.activities.JAWSActivity$WifiScanReceiver@a1e7c70
            at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:891)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:148)
            at android.app.ActivityThread.main(ActivityThread.java:5417)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
     Caused by: java.lang.SecurityException: Need ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission to get scan results
            at android.os.Parcel.readException(Parcel.java:1599)
            at android.os.Parcel.readException(Parcel.java:1552)
            at android.net.wifi.IWifiManager$Stub$Proxy.getScanResults(IWifiManager.java:1066)
            at android.net.wifi.WifiManager.getScanResults(WifiManager.java:1311)
            at is.pinterjann.jaws.activities.JAWSActivity$WifiScanReceiver.onReceive(JAWSActivity.java:153)
            at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:881)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:148)
            at android.app.ActivityThread.main(ActivityThread.java:5417)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
jannispinter commented 8 years ago

Thank you! I'll fix this in a minute

jannispinter commented 8 years ago

Should be fixed in commit 4c1972356232cc4e41b24b2b2645bff48bb525d7