Comments (1)
P2P_STAR is meant for 1:N connection topologies, so it's going to be difficult (not impossible, but complicated, because you essentially need master-election) for you to build a self-assembling network using that -- that's because once an Advertiser establishes the first incoming connection, it cannot then make any outgoing connections (because it is now the "1" in the 1:N topology).
A better way to model this might be to have every Advertiser a random number as a part of its endpointName, with the rule that everyone will only connect to the Advertiser with the highest number it sees; that achieves a rudimentary master-election without a prior shared control plane, but you'll need some tweaks like letting all Discoverers discover for some fixed time (like 20 seconds) before ranking all the Advertisers it sees (to decide who the "host" of the group is). What I've mentioned is also not robust in the face of new phones leaving and joining the group, but there's clever ways you can work around that if you give it some thought. :)
Also, in the future, please post questions that are not related to the sample apps themselves on StackOverflow (tagged with https://stackoverflow.com/questions/tagged/google-nearby).
Good luck!
from android-nearby.
Related Issues (20)
- Nearby API doesn't work without internet connection HOT 2
- Stale Nearby Notifications? HOT 3
- Following sample receive "Attempting to perform a high-power operation from a non-Activity Context"
- Images HOT 4
- NearbyDevices Readme - What is APIs & auth in reference to?
- Discovery onEndpointLost never called? HOT 12
- Failed to resolve: com.google.android.gms:play-services-nearby:14.0.0
- Nearby.CONNECTIONS_API is not available on this device. HOT 1
- Could not find dependency "com.google.android.gms:play-services-nearby:14.0.0" HOT 3
- Error:(195, 35) error: cannot find symbol class Builder HOT 1
- Fetch Eddystone UID using Nearby Messages API HOT 2
- API 28 and androidx: RockPaperScissors build fails with "Program type already present" HOT 3
- Error:Flavor 'automatic' has no flavor dimension. HOT 3
- Programmatically present the “Configure Nearby” Settings page in the device’s Settings app. HOT 3
- Unnecessary semi-colon in progress updates section on API doc page HOT 2
- No getSize() on Payload object? HOT 2
- Nearby Connections support for iOS
- null payloadFile (API documentation page) HOT 2
- Documentation: not initialising the file payload HOT 1
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 android-nearby.