How to create access point programmatically

前端 未结 3 1114
故里飘歌
故里飘歌 2021-01-31 19:22

I\'ve written the code to create an access point for android devices. I\'ve tested on both emulator and real device.But it doesn\'t work. Where did i get wrong?

         


        
3条回答
  •  遇见更好的自我
    2021-01-31 20:00

    You need few things to make this code to work.

    1) Init wifiManager onCreate() :

    WifiManager wifiManager = (WiFiManager) getSystemService(Context.WIFI_SERVICE);
    

    2) You need to ask for this permissions in you AndroidManifest.xml :

    
    
    
    

    3) Your application need to be signed with system certificates.

提交回复
热议问题