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, used when “sharing” a file with another app, usually as Data URI or "android.intent.extra.STREAM" extra. Ensure to also enable the appropriate Grant flags where available.

Flags:

FlagDescription
"a"Convert path to a Automate content provider URI, the default
"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.