Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent reconnection if the connection is rejected with a specific device #30

Open
ekigamba opened this issue Mar 26, 2019 · 8 comments
Assignees
Labels
question Further information is requested

Comments

@ekigamba
Copy link
Contributor

Currently, the app keeps on trying to reconnect when you reject the connection. Should we like blacklist the device after the first connection is rejected? So that the reconnection does not happen. How should this be handled on both the sender and receiver depending on which side rejects the connection to the other device.

@ekigamba ekigamba added the question Further information is requested label Mar 26, 2019
@ekigamba
Copy link
Contributor Author

@githengi Kindly weigh in on this issue since it will affect the mockup designs

@ekigamba ekigamba changed the title Prevent reconnection is the connection is rejected with a specific device Prevent reconnection if the connection is rejected with a specific device Mar 28, 2019
@githengi
Copy link
Contributor

Yes this makes sense.

The device can be blacklisted for a small time duration e.g 2-5 minutes

If device is being blacklisted forever or a long time there has to be UI for viewing blacklisted devices in case the user made an mistake rejecting a connection or in the future they want to connect to such a device.

@ekigamba
Copy link
Contributor Author

ekigamba commented Mar 28, 2019

Do you think we should leave this decision to the user incase they blacklisted it by mistake for the 2-5 minutes? I am not sure what would be the most probable case in our end user use-cases

@githengi
Copy link
Contributor

Lets consult with wider group.

@craigappl
Copy link

I feel like there may be another way to solve this. As I understand it, there's an advertiser who is making their connection available and a discoverer who is waiting to receive the connection. Once the connection is initiated, it's up to both of the advertiser and discover to accept the connection when the onConnectionInitiated is triggered. (Please correct me where I'm wrong.) (Link: https://developers.google.com/nearby/connections/android/manage-connections)

It sounds like we have created a continual loop because the EndpointDiscovery process automatically requests the connection. Would it be appropriate to display a list of devices when onEndpointFound instead of automatically requesting a connection and jumping to the onConnectionInitiated phase? This would allow the user to choose which device(s) to connect to and then ensure that it won't be rejected.

@githengi
Copy link
Contributor

We can display the list of devices available which a device can connect to.

However we have to manage this explicitly because onEndpointFound will be invoked for each device that is found. We have to store/cache the endpoints and display the list of endpoints to user and initiate connecting for the device that was chosen.

We thought for the MVP where we are not supporting more that two devices, if any two devices connect they stop broadcasting/discovering. So assumed that we don't have to implement the selecting device for the MVP.

@githengi
Copy link
Contributor

We need to implement ignoring connections to devices that authorization failed i.e application rules did not pass e.g devices not on same team/location/etc

@githengi
Copy link
Contributor

githengi commented Mar 29, 2019

For the MVP we have decided to use the simplest option

  • If one of the devices rejects the connection. Track that device for configurable duration. within that duration if device tries to connect again ask user to confirm if they want to connect to the device. If user rejects connection, then block the connection until app is restarted.

  • Block connection until the app is restarted whenever authorization fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants