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

Attempting to Connect to Boscloner - Loading/Connection Screen #9

Open
Boscloner opened this issue Jun 6, 2018 · 6 comments
Open
Assignees
Labels
Low Priority Not Mission Critical, but something that should be addressed when there aren't more pressing issues.

Comments

@Boscloner
Copy link
Contributor

We need to have a screen that appears to the user when the Boscloner is in a disconnected state.

For example, if i were to launch the app on iOS and the Boscloner board was not in range or was powered off, the iOS app would show the following screen to me letting me know that the Boscloner is not yet connected:
image-1-2

This same screen will occur at any point the Boscloner becomes disconnected / powered off while the user is using the app.

Note that while some of the functions have visually disappeared from the screen while in this disconnected state, the history screen and the settings bars are still available. The user can still visit the history screen and view the stored data, but they will not be able to send any WRITE commands to the Boscloner board until the bluetooth connection is established again.

@Boscloner
Copy link
Contributor Author

This seems to function as intended, but please match the style of the iOS version.

The iOS version uses a dark grey background color and uses the phrase:
"Attempting Connection to Boscloner"

@Boscloner
Copy link
Contributor Author

A few things on this:

  • It seems to take nearly 5 seconds or so before it recognizes that the Boscloner has been disconnected. This needs to happen within one second (or as instant as possible)

  • When in a disconnected state and in the History screen, the user should not be able to send any WRITE commands to the board (since it is disconnected). When the user presses on a badge ID from the history file, they should be given a popup that tells them the Boscloner is in a disconnected state...instead of allowing them to proceed as normal.

You can find that code in my iOS version that simply shows a dialog box that tells them the Boscloner is disconnected and does not allow them to proceed with any write commands. Please copy the iOS version functionality.

@Boscloner Boscloner removed the Done label Jul 16, 2018
@aleksamarkoni
Copy link
Contributor

Ok will change this, but I am not sure if I am able to influence the disconnected thing. Android has timeouts that are still in place and only if you timeout you will be disconnected. I am not sure how is that working on the iOS, but I will check. When it comes to the writing, I was prociding as normal and just disregarding the write to the boscloner board since that was easiest to implement. I will need to change a logic a bit to support this, but will do it.

@aleksamarkoni
Copy link
Contributor

This should work now, so when you try to write from the history page, you will get a dialog that says boscloner disconnected. The messages are the same as in iOS app.

@Boscloner
Copy link
Contributor Author

We can set this issue aside as a low-priority, cause it works well...but it still takes 5 seconds before it recognizes that the Bluetooth board has been disconnected. I'd like to get that down to no more than 1 second. On the iOS, I have a timer running every second to check the Bluetooth connected state.

Essentially,

  • every 1 second run this timer()
  • the timer executes a function ( func isAliveCheck )

if isAliveCheck sees that the bluetooth status is connected, it returns and no action is taken.
if is AliveCheck sees that the bluetooth status is disconnected, it immediately starts the bluetooth pairing process again from the beginning.

@Boscloner Boscloner added Low Priority Not Mission Critical, but something that should be addressed when there aren't more pressing issues. and removed Done labels Jul 18, 2018
@aleksamarkoni
Copy link
Contributor

Hi @philimanjaro, as I told you Android has the timers on its own, so even you have the timer to check if the device is disconnected, that might not give you the proper answer like in the ios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Low Priority Not Mission Critical, but something that should be addressed when there aren't more pressing issues.
Projects
None yet
Development

No branches or pull requests

2 participants