AndroidManifest: handle allowed actions
This commit is contained in:
parent
ce10cf8fe3
commit
a8a43f8708
@ -221,7 +221,27 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
|
||||
// Subscribe to all events (initial link and further)
|
||||
final sub = appLinks.uriLinkStream.listen((uri) {
|
||||
doSSH("innentuer-open");
|
||||
final allowedActions = [
|
||||
'innentuer-open',
|
||||
'aussentuer-open',
|
||||
'lab-close',
|
||||
'werkstatt-open',
|
||||
'werkstatt-close',
|
||||
];
|
||||
|
||||
final action = uri.host;
|
||||
|
||||
if (!allowedActions.contains(action)) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text("Unknown action: $action"),
|
||||
duration: const Duration(seconds: 3),
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
doSSH(action);
|
||||
});
|
||||
|
||||
// we do not await generateKey() here, as this is the intended way
|
||||
|
Loading…
x
Reference in New Issue
Block a user