Comments (4)
Hi, @NoamDev
Well, it's good question :)
If you look at implementation of this method (https://github.com/kirillzyusko/react-native-wifi-p2p/blob/master/android/src/main/java/io/wifi/p2p/WiFiP2PManagerModule.java#L61) you can see this function has side effect (saving new info into local wifiP2pInfo
variable).
And this method is only used in sendMessage/sendFile flow. And in future I would like to simplify these flows and get rid off the usage of this method.
That's why I marked this method as temporary
- I don't know whether we need to have this method in future after simplifying flow or not :)
Nonetheless if I make breaking change I will publish new version as 2.x.x and prepare some migration documents.
So now you can use this method.
Did I answer on your question? :)
from react-native-wifi-p2p.
from react-native-wifi-p2p.
@NoamDev
The lifecycle method is not an evil π
I was just curios why did I need to use this method in the sending messages/files flow. Why did I need to update a variable? As far as I remember I didn't see anything in official docs - that's why I marked this method as temporary
.
I think I should remove this label :)
from react-native-wifi-p2p.
from react-native-wifi-p2p.
Related Issues (20)
- Help required HOT 8
- Unable to startPearDiscovery - Android 10 HOT 7
- Urgent: Sending File from Server to Client HOT 5
- Could not resolve all files for configuration ':react-native-wifi-p2p:classpath' HOT 7
- Android 13 rejects startDiscoveringPeers() with code 0 HOT 7
- Receive messages when the device is a mobile hotspot HOT 1
- sendMessage and receiveMessage refactoring? HOT 6
- connectionInfo is not updated when connection closes HOT 5
- SendMessageTo - can't use MAC address and we don't have ip addresses HOT 7
- sendFile and receiveFile refactoring HOT 6
- I want to make a real-time-streaming (Two Android devices connected 1:1) HOT 2
- Get Available devices not working HOT 4
- getAvailablePeers() always return empty array HOT 3
- method getAvailablePeers() always return empty device array HOT 1
- TypeError: null is not an object (evaluating 'WiFiP2PManager.init') HOT 1
- startDiscoveringPeers function is working in debug mode but not working in release apk anyone has any solution about that? HOT 10
- Library is not working in Android Version 12 or more upgrade version HOT 9
- Issue in Android version 13 HOT 2
- Library not working on latest android versions HOT 5
- Not working on Andriod 14 HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-wifi-p2p.