Closed ainaylo closed 1 year ago
I don't think we can include it as it is. First of all, it should be a more generic solution without any references to specific hardware vendor. Secondly, I would prefer to hide this setting somewhere for advanced users to avoid any confusion.
Default intent could be changed to f.e. 'org.traccar.intent.action.SOS' or something if you have suggestions? Other than that there is no references to hw.
For hiding the pref, we're open to suggestions. Entry in the drop down menu after About?
It would be nice to have some useful default, or no default.
As for hiding it, maybe instead of preferences we can have it in menu with a simple dialog.
We can leave it with no default, and as such it wouldn't register any listeners.
If we add a menu item below 'About', named 'SOS Trigger'. Once clicked it would open a simple dialog box with a) label 'Specify a Broadcast Intent that will trigger a SOS Alarm' b) textbox for the string which will then be saved to preferences c) 'Save' -button.
How would that work?
I would name it "SOS broadcast", but yeah, sounds good.
I just realized the you've added the code to NetworkManager, which is definitely not the right place for this.
Please let us know what would be the place you prefer
Not sure, but definitely not there.
Adds a preference for SOS trigger broadcast intent, and a broadcast listener for the specified intent. When valid intent is seen, SOS is sent to server.