SAF: App Inventor implementation of Storage Access Framework

1.Introduction

Description: Basically AI2 wrapper of Storage Access Framework. Using this extension, you can get read and/or write access to a single document or tree document (and all of its children recursively). SAF lets users browse and open documents, images, and other files across all of their preferred document storage providers. A standard, easy-to-use UI lets users browse files and access recent files in a consistent way across apps and providers.

SAF offers the following features:
  • Lets users browse content from all document providers, not just a single app.
  • Makes it possible for your app to have long-term, persistent access to documents owned by a document provider. Through this access, users can add, edit, save, and delete files on the provider.


Latest Version: 1.2
Released:  September 17, 2021
Last Updated:  July 3, 2023

2.Blocks

image
image
image
image
image
image
image

3. Documentation

AfterAudioExtractedEvent invoked after getting result of ‘ExtractAudio’ function
successful | boolean
response | text
AfterMergeMediaEvent invoked after getting result of ‘MergeMedia’ function
successful | boolean
response | text
AfterVideoExtractedEvent invoked after getting result of ‘ExtractVideo’ function
successful | boolean
response | text
AfterVideoTrimmedEvent invoked after getting result of ‘TrimVideo’ function
successful | boolean
response | text
ExtractAudioTries to extract audio from given video file
videoPath | text
audioOutputPath | text
startMs | number
endMs | number
ExtractVideoTries to extract video from given video file (and removes audio)
videoPath | text
videoOutputPath | text
startMs | number
endMs | number
MergeMediaTries to merge/mux audio and video file and saves to output file
audioPath | text
videoPath | text
outputPath | text
TrimVideoTries to trim video with given parameters
videoPath | text
videoOutputPath | text
keepAudio | boolean
startMs | number
endMs | number

4. Basic Usage

It is very difficult to explain all the usages in one post so I’ll post the usages of this extension in snippets category.

Basic usage is as follows:

Open document tree

Get access to Root Tree (not necessary for one-time usage)

Build child document uri

  1. if document is direct child
  1. if document is grandchild

Read file/Set picture

For more information or to discuss about the extension please visit AI2 Community

5. Downloads

5. External References

There has been a lot of discussion related to SAF in AI2 Community and Kodular Community. Here are the respective threads:

https://community.appinventor.mit.edu/t/saf-app-inventor-implementation-of-storage-access-framework/41603

https://community.kodular.io/t/saf-app-inventor-implementation-of-storage-access-framework/144020

6. Support Me

You can keep me motivated to create extensions like this by donating some amount.

Thank you.

Hope it helps!

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments