-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
x-callback set offline mode bug #363
Comments
I just tested the callback URL on my Mac and it seems to work every time. To narrow down your problem some more you can try the following: If you enter the callback URL in Safari and hit enter, a popup to open Amperfy will appear. Click okay. Now verify if the offline mode did change. Does this work reliably every time? If so, then the problem most likely lies within the shortcut itself. Maybe it is trying to be smart by caching a URL or something like that. |
@Schlaubischlump thank you for getting back to me! I just tried:
It opened the app but did not change the offline mode to the specified setting. I'm using a iOS device not macOS for this testing to be clear. |
It's working fine for me. On all devices. iOS, macOS and iOS Simulator. You need to navigate away from the settings tab after Amperfy opened the URL. Otherwise the "Offline mode" switch will not update and you still see the old state of the toggle. Can you try that? |
I tried both navigating away from the settings tab and closing the app, it seems to intermittently accept the change. Waiting and trying again seems to work better but not 100%. |
Maybe related #372 ? |
I think so. Since 18.0 there are a lot of reports in places I didn't even touched for ages. |
Hey I may have found a small bug in the x-callback setOfflineMode setting.
I didn't know about using x-callback for shortcuts until using your app because it has all the documentation in settings. I don't have a programming background and it was great to find that documentation and be able to iterate with it. Thank you for that!
My goal was to make a shortcut icon on the Home Screen that first checks to see if I'm on my home wifi and set the x-callback setOfflineMode to the proper setting. Example if phone is connected to home wifi, set x-callback setOfflineMode to 0, else 1. I've attached screenshots of the shortcut. It works most of the time ~70%.
I've narrowed it down to the callback url. I did this by creating a shortcut that just sets the mode to 1 or 0 and it seems it's most likely to change it the first time you run it. After you run it, it seems to not want to take another change right away. If I leave it alone for 20-30 minutes it seems to most often take the callback url and make the appropriate change.
It's also 100% possible I don't know what I'm doing! At a minimum I really enjoyed learning how callbacks worked.
I noticed if I long hold on the application it also has the option to open in offline mode, this works 100% of the time for me, could that option be exposed to the shortcuts app to avoid using the callback url for a possible more reliable alternative?
Thank you for looking!
The text was updated successfully, but these errors were encountered: