<h1>FAQ</h1><h2>This app is free and contains no ads. What's the catch?</h2><p>There is no catch. I'm a developer who one day realized he needed an app like this, built it, and then decided to share it. HTTP Shortcuts is essentially a one-man show, and I'm only working on it in my spare time. I'm doing it because I enjoy the project, which is why the app is completely free and will remain so. No ads, no tracking, no premium features, just a simple open-source app that aims to be useful.<p>If you want to show your support though, check out <a href=https://http-shortcuts.rmy.ch/support-me>this page</a>.<h2>Running shortcuts works from within the app, but not from the home screen. How do I fix it?</h2><p>This usually happens when Data Saver or Battery Saver is enabled, as those restrict how apps can use the network. Try disabling them or whitelisting the HTTP Shortcuts app.<p>It might also be that you need to enable the "Allow drawing over other apps" option. You'll find it in the app's Settings page in the Troubleshooting section.<h2>I don't like the blue arrow icon that overlays all my shortcuts on the home screen. Can I remove it?</h2><p>Unfortunately, this icon overlay is added by the Android system itself, not the app. There is a potential workaround though. Try adding a shortcut via your home screen's widget menu (usually accessed by long pressing on the home screen), and when prompted by the app about which method to use for placement, select the <em>Legacy</em> option. Please note that this may not always work, and if it doesn't then there really is no way to remove the icon overlay. Also note that this will prevent you from dynamically changing the name or icon of the shortcut, i.e., you'll need to remove and re-add it to the home screen manually if you change its name or icon.<p>Alternatively, you can use the <em>"Customizable Widget"</em> from your home screen's widgets menu. This widget looks a bit different from a regular shortcut and offers a few customization options.<p><a name=trigger-from-other-app></a><h2>Can I trigger a shortcut from another app?</h2><p>Most automation apps offer some way to trigger a shortcut directly. If that isn't an option you can instead trigger a shortcut by sending a <em>broadcast intent</em> with the following parameters:<ul><li>action: "ch.rmy.android.http_shortcuts.execute"<li>package name: "ch.rmy.android.http_shortcuts"<li>string extra "id" which holds the ID* of the shortcut you want to trigger</ul><p>Alternatively, you can invoke a shortcut via a deep-linking URL, which is particularly useful when you want to trigger a shortcut from a QR code or an NFC tag.<p>* You'll find the shortcut's ID as well as its deep-linking URL by long-pressing the shortcut and selecting <em>Show Info</em> from the menu.<p>See also the <a href=advanced.md#deep-link>documentation on deep-linking</a>.<h2>Can I send multiple requests with one shortcut?</h2><p>A normal shortcut corresponds to a single request. You can, however, have one shortcut trigger one or more other shortcuts. The easiest way to achieve that is by creating a <a href=shortcuts.md#multi-shortcut>"Multi-Shortcut"</a>, which allows you to pick one or more shortcuts which are then all triggered when the multi-shortcut itself is executed, one after the other.<p>In some cases using a Multi Shortcut might not be enough, e.g., when you want to trigger the same shortcut twice, want to trigger it only under certain conditions or if you want to pass variable values to it. In this case you can create a <a href=shortcuts.md#scripting-shortcut>"Scripting Shortcut"</a> instead and add one or more instances of the <a href=scripting.md#trigger-shortcut>"enqueueShortcut"</a> action to it. When creating or editing your scripting shortcut, open the section "Scripting" and then click the button "Add Code Snippet" underneath the textarea. In the dialog that opens select "Miscellaneous" and then "Enqueue Shortcut". This way, whenever you run your first shortcut, it will trigger the selected other one after it completed. See <a href=scripting.md#trigger-shortcut>the Scripting documentation</a> for more information.<h2>Can I schedule requests to be sent periodically or at a specific time?</h2><p>Currently the app only has basic functionality for running a shortcut repeatedly. When creating or editing the shortcut, go to the <em>Trigger & Execution Settings</em> section and look for the <em>Run repeatedly</em> dropdown at the bottom.<p>If you need more advanced or more precise scheduling, you can try to achieve that by combining the app with an automation app, such as Tasker or Macrodroid.<h2>Can I trigger a shortcut with text shared from another app? Can I share text (e.g. a link) into a shortcut?</h2><p>If you want to share text via an HTTP shortcut, you can do so like this:<ol><li>Open the app<li>Open the dropdown menu at the top right and select <em>Variables</em><li>Click the + button and select <em>Static Variable</em> as the variable type<li>Enter a name for the variable<li>**Tick the <em>Allow 'Share...'</em> checkbox<li>From the dropdown menu that appears below select which part of the shared text you want to handle: text, title, or both<li>Click the checkmark button at the top right to save your variable<li>Go back to the app's main screen<li>Click the + button to start creating a new shortcut or long press an existing shortcut and select <em>Edit</em> to open the shortcut editor<li>Find the input field for the place where you want to share the text as, e.g. the URL, the request body or a header. Click the <em>{}</em> button next to that field<li>Select the variable that you created earlier<li>Save the changes to your shortcut<li>You should now be able to share text from other apps (e.g. a URL from a browser) into the HTTP Shortcuts app and there select your shortcut as the share target. It will execute the shortcut and insert the shared text into where you put the variable placeholder.</ol><h2>Can I share files into a shortcut's request body?</h2><p>Yes, you can. You'll find information about this on the <a href=advanced.md#share-files>advanced features</a> page.<h2>Can I pass values from one shortcut to another?</h2><p>Yes, you can. To do so, you need to first create a <a href=variables.md>global variable</a> (of static type) to hold the value. You can then use the <a href=scripting.md>Scripting</a> feature to store a value into that variable from one of your shortcuts and then use or read out the value again in the other shortcut. To store a value into a variable, use the <a href=scripting.md#variables>setVariable</a> function.<p>If you use <a href=scripting.md#execute-shortcut>executeShortcut</a> to call another shortcut, you can also use the <a href=scripting.md#set-result>setResult</a> function to pass data back to the calling shortcut.<h2>How do I pass data from Tasker to HTTP Shortcuts?</h2><p>See the guide on <a href=advanced.md#integrate-with-tasker>integrating with Tasker</a>.<h2>In what order are variables resolved? Can I change the variable resolution order?</h2><p>Primarily, variables are resolved in the order in which they appear on the Variables screen. You can change this order by rearranging the variables there. If this is not sufficient, e.g. because you use the same variables in multiple shortcuts but want a different order per shortcut, there is a workaround you can do:<ol><li>In the shortcut editor, click on "Scripting"<li>In the "Run before Execution" field, add a line like the following, one for each variable that you want to use, in the desired order:</ol><pre><code class=language-js>getVariable("my_variable2");
0 commit comments