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

Add option to directly change server if website is down #197

Closed
fm-sys opened this issue Apr 24, 2022 · 8 comments
Closed

Add option to directly change server if website is down #197

fm-sys opened this issue Apr 24, 2022 · 8 comments
Labels
feature request New feature or request

Comments

@fm-sys
Copy link
Owner

fm-sys commented Apr 24, 2022

Describe the feature

From time to time snapdrop.net is down, which is inconvenient for users and leads to many bad Google Play reviews.

If the app is unable to reach https://snapdrop.net it could automatically redirect to a fallback server.

@Bellisario has created a node.js version of snapdrop, which can be found here:

https://node-snapdrop.herokuapp.com/

May we use this instance and is the server capable to handle larger traffic?

Describe alternatives you've considered

It needs to be decided if we want to inform the user or not.

Either this happens without user interaction, with the downside that sending files between two android apps will work but users will not know which webpage to open on Windows/Mac/IOS.

Or we show a dialog: "Snapdrop.net is currently unavailable. Do you want to use the fallback server https://node-snapdrop.herokuapp.com/ in the meantime?"

Additional context

Related to #183

@fm-sys fm-sys added the feature request New feature or request label Apr 24, 2022
@ueen
Copy link
Contributor

ueen commented Jun 25, 2022

great idea!
i like the dialog, its telling the user whats up, another dialog sould then intruct the user to also type the new adress in the browser, maybe there could be a shortened url to make it easier :)

@asadm
Copy link

asadm commented Aug 16, 2022

I would like to +1 this idea. snapdrop is down right now and has been for a few days now.

I have spinned up a mirror which I plan to maintain and improve on. Can be added as a fallback option / mirror: https://airdope.io

@ueen
Copy link
Contributor

ueen commented Aug 20, 2022

@asadm thanks for the mirror @fm-sys i cant enter it in the app, says it doesnt seem to be an snapdrop instance (works in normal browser), any ideas?

@fm-sys
Copy link
Owner Author

fm-sys commented Aug 20, 2022

I had implemented a very basic check whether the entered website can be accessed and is a fork of snapdrop. Currently, the only thing I do is to search whether the word snapdrop is contained anywhere inside the html. For sure, this can be replaced by a better algorithm.

@asadm if you add a comment like <-- snapdrop fork --> to your HTML it should get possible to activate this website inside the Snapdrop for Android app. For sure, we need to check whether it correctly runs inside the app, cause website adoptions might break some app-specific js code.

@Bellisario
Copy link

@fm-sys I'm not a Java developer so I don't know if this can be made, but I can suggest to check if the Snapdrop class is present in the window object, because it is exposed.
In this way, I was able to detect Snapdrop in the original, mine and @asadm one.

DevTools example below

image

@asadm
Copy link

asadm commented Aug 21, 2022

I have added a <!-- snapdrop fork --> to the HTML. Can you check now?

@fm-sys
Copy link
Owner Author

fm-sys commented Aug 27, 2022

I have added a <!-- snapdrop fork --> to the HTML. Can you check now?

I'm now able to set your website inside the app and sending files does work as expected. However, receiving files does not work. Some change seems to cause an incompatibility here...

@fm-sys
Copy link
Owner Author

fm-sys commented Mar 28, 2023

Switching the server automatically isn't a good idea IMHO (although I had initially suggested it)

Still it would be nice to make switching the server more easy which is discussed in #183

Furthermore we show an info dialog if the server is down. We could directly link to the server switching page in these cases.

@fm-sys fm-sys changed the title Automatic server switching if snapdrop.net is down Add option to directly change server if website is down Mar 28, 2023
@fm-sys fm-sys closed this as completed in 4df4d7d Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants