Android Question Connect to Wifi network

arautio

Member
Licensed User
Longtime User
hello
i want to make application which can search and connect to wifi network using ABWifi but i just can search the network. how about to connect? maybe one of you ever try to make it.
thankyou
 

arautio

Member
Licensed User
Longtime User
Hey Erel

I see this that you wrote in the old Post "

Add this line to the manifest editor:

AddPermission(android.permission.CHANGE_WIFI_STATE)

i have the same Problem,




PackageAdded: package:it.android.imgspa.and_WifiChange
** Activity (main) Create, isFirst = true **
main_activity_create (B4A line: 33)
w1.connectToSSID(w1.WIFI_WPA, "test", "test")
java.lang.SecurityException: WifiService: Neither user 10087 nor current process has android.permission.CHANGE_WIFI_STATE.
at android.os.Parcel.readException(Parcel.java:1425)
at android.os.Parcel.readException(Parcel.java:1379)
at android.net.wifi.IWifiManager$Stub$Proxy.addOrUpdateNetwork(IWifiManager.java:610)
at android.net.wifi.WifiManager.addOrUpdateNetwork(WifiManager.java:620)
at android.net.wifi.WifiManager.addNetwork(WifiManager.java:582)
at anywheresoftware.b4a.jalle007.wificonnect.WiFiConnect.connectToSSID(WiFiConnect.java:61)
at it.android.imgspa.and_WifiChange.main._activity_create(main.java:242)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
at it.android.imgspa.and_WifiChange.main.afterFirstLayout(main.java:89)
at it.android.imgspa.and_WifiChange.main.access$100(main.java:16)
at it.android.imgspa.and_WifiChange.main$WaitForLayout.run(main.java:74)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5086)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
at dalvik.system.NativeStart.main(Native Method)
java.lang.SecurityException: WifiService: Neither user 10087 nor current process has android.permission.CHANGE_WIFI_STATE.


i have to change the AndroidManifest.xml in Objects ? (sorry my English is verry bad)
everytime when i do this, after start is gone.

Thanks
 
Upvote 0
Top