Automate

Automate

Make your phone or tablet smarter with automation

Get it on Google Play

fileUri

text fileUri(path, flags)

Returns file path converted to a URI, in format of flags, for use when “sharing” a file with another app, usually as Data URI or "android.intent.extra.STREAM" extra.

Flags:

FlagDescription
"a"Convert path to a Automate content provider URI, the default. Ensure to also enable the appropriate Grant flags where available.
"s"Convert path to a signed path Automate content provider URI. Privacy warning! Every app with the URI will be able to read the content of the file, never use on sensitive data.
"d"Convert path to a system document URI. (Android 4.4+)
"f"Convert path to a file URI.

Parameters

  1. pathtext file path to convert to a URI.
  2. flags — optional text where each character is a flag.

Returns

  • the path converted to a URI, or null if "d" flag conversion failed.
Note! This documentation is also accessible within the app from Help & feedback menu.