Waboodoo / HTTP-Shortcuts

Android app to create home screen shortcuts that trigger arbitrary HTTP requests
https://http-shortcuts.rmy.ch
MIT License
1.17k stars 113 forks source link

Creating Shortcut Apps on Head Unit #318

Closed ukiews closed 1 year ago

ukiews commented 1 year ago

I have Teyes head unit. Similar to Joying. As with most car head units, the launcher app takes over the Home Screen and does not allow creating shortcuts. Is it possible to have the app create an app shortcut directly in the apps menu?

maybe HTTP-shortcuts could create simple apk files to run like a normal app.

Waboodoo commented 1 year ago

I see your problem. Currently this is not possible in the app. I suppose, as you suggest, the simplest solution would be to just create a separate APK which then just invokes a shortcut when opened. This comes with a bit of overhead though (bootstrapping a new app, figuring out how to publish it, selecting which shortcut should be used, etc.), so I can't make any promises that I'll get around to building this. Would be a great opportunity for contributions, maybe I can find someone willing to look into this before I do it myself eventually. Anyway, I'll keep this issue open for now, until I have some solution for it.

ukiews commented 1 year ago

Great! Hope this could happen. Thank you in advance.

Waboodoo commented 1 year ago

Actually, I might have found a better solution, though I don't know if it will work for your use case. For the upcoming release (version 2.27.0), I'm including a new feature which allows to enable a secondary app. This app will trigger a shortcut when opened. You'll be able to configure this by going to the "Trigger & Execution Settings" screen when editing a shortcut.

ukiews commented 1 year ago

If there will an actual secondary app in the app list, this should work. However, will not this secondary app only be limited to triggering one shortcut?

On Tue, Dec 20, 2022 at 07:25 Roland Meyer @.***> wrote:

Actually, I might have found a better solution, though I don't know if it will work for your use case. For the upcoming release (version 2.27.0), I'm including a new feature which allows to enable a secondary app. This app will trigger a shortcut when opened. You'll be able to configure this by going to the "Trigger & Execution Settings" screen when editing a shortcut.

β€” Reply to this email directly, view it on GitHub https://github.com/Waboodoo/HTTP-Shortcuts/issues/318#issuecomment-1359561966, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASXMW3BHFSK2Y6BVM76GVPTWOHFYFANCNFSM6AAAAAASVAE5F4 . You are receiving this because you modified the open/close state.Message ID: @.***>

Waboodoo commented 1 year ago

Yes, there will be an actual second app in the app list. If you enable this option for more than one of your shortcuts then you clicking the secondary app will show a selection dialog with all the shortcuts for which this is enabled, similar to how it works for the Quick Settings Tile or the "Share Into" feature.

ukiews commented 1 year ago

Would it be possible to designate an icon for the secondary app? In my situation, all I am trying to create is a toggle switch to open/close the garage.

I can do that by launching the shortcuts app, but would like to not have to go through the menu each time.

B5CF2226-F876-43C2-8332-1723D0853B9B 82E376C5-5C23-4D06-93A7-8B7DD2857EA4

Waboodoo commented 1 year ago

Version 2.27.0 is now released. Can you give it a try and see if it solves the issue for you? You'll find instructions for enabling the secondary launcher app on this page: https://http-shortcuts.rmy.ch/advanced

Would it be possible to designate an icon for the secondary app?

Unfortunately there is a technical limitation here. The icon and name of the secondary app needs to be statically defined by the app and cannot be changed dynamically.

ukiews commented 1 year ago

Thank you. It’s not ideal, but it does work better than the default app, in that there is only a popup, and the secondary triggering app does not take over the whole screen to trigger a select shortcut.

Waboodoo commented 1 year ago

Glad to hear it works πŸ‘πŸ» . I'll close this then.