Комментарии:
My code not finding device its just showing discory failed
ОтветитьSomeone kindly help me. After this step, my project does not discover other peers. It just jumps directly to Discovery not started.
ОтветитьIs it only problem for me but I can't eveb get the Device not Found title when I start to discovery.I can just get Discovery Started or Discovery Failerd.
I am suspicious about if my code doesn't work for onPeersAvaliable.
It takes too long for me for discovering of peers after i typed the sending of message code
ОтветитьFor the people who're having a problem with the WifiP2pManager.ActionListener() permissions, just do ALT+ENTER on the ActionListener() function and you should get the ActivityCompat.checkSelfPermission method implemented. In the parameters for the function, replace "this" in the context with "MainActivity.this". That should fix the error for Android 10+ devices!
ОтветитьSir I got exception bound
Ответитьwhat emulator did you use for this? tnx
ОтветитьHi, I tried this code on Nokia 6.1 plus device run AndroidOne system and when press discover button always shows discovery not started so why does this is happening, and how to solve this problem? but it works on galaxy A20 device
UPDATE: (Solved) for the problem (android 10+ discover button not working)
the solution is allow location services for this app from your mobile android setting (in my case Nokia 6.1 plus)
go to your mobile Settings->Location->App permission->choose your app->select Allow only using the app
That should solve the problem for android 10+ mobiles
Thank you sir for the colossal work.
Sir please which android API level did you use in this application? and, what are the versions that are suitable for this project? I have android version 6.0 and android version 8.0 and the discover button procedure worked in the 6th version and did not work in the 8th version please help me out sir to find a solution for this issue
Sir connection did not work on android level 29 and above
ОтветитьAre not you repeating the same thing? what about permissions? and can you please share the changes required to make it run on android 9 or 10.
ОтветитьHi i´m unable to recreate the onClick Methode. Android Studie asked me to add a permisson check oder suppress the permisson. I have tried both and nothing seems to work. On my emulator i only get "reason 2 - Busy" and on my real device i get "reason 0". Is there something i missed?
ОтветитьHi I followed your original series but I was unable to send messages after trying to connect two devices. I get sConnected failed: ECONNREFUSED (Connection refused). I know you are releasing an update in the coming days but I have a time constraint on my project and I was wondering if you had some advice to get past this issue
Ответить