JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::AndroidDocumentPermission Class Reference

Represents a permission granted to an application to read and/or write to a particular document or tree. More...

#include <juce_AndroidDocument.h>

Collaboration diagram for juce::AndroidDocumentPermission:

Public Member Functions

int64 getPersistedTime () const
 The time when the permissions were persisted, in milliseconds since January 1, 1970 00:00:00.0 UTC.
 
URL getUrl () const
 The url of the document with persisted permissions.
 
bool isReadPermission () const
 True if the permission allows read access.
 
bool isWritePermission () const
 True if the permission allows write access.
 

Static Public Member Functions

static std::vector< AndroidDocumentPermissiongetPersistedPermissions ()
 Returns all of the permissions that have previously been granted to the app, via takePersistentReadWriteAccess();.
 
static void releasePersistentReadWriteAccess (const URL &)
 Revokes persistent access to a document or tree.
 
static void takePersistentReadWriteAccess (const URL &)
 Gives your app access to a particular document or tree, even after the device is rebooted.
 

Private Attributes

bool read = false
 
int64 time = 0
 
URL url
 
bool write = false
 

Detailed Description

Represents a permission granted to an application to read and/or write to a particular document or tree.

This class also contains static methods to request, revoke, and query the permissions of your app. These functions are no-ops on all platforms other than Android.

@tags{Core}

Member Function Documentation

◆ getPersistedPermissions()

static std::vector< AndroidDocumentPermission > juce::AndroidDocumentPermission::getPersistedPermissions ( )
static

Returns all of the permissions that have previously been granted to the app, via takePersistentReadWriteAccess();.

◆ getPersistedTime()

int64 juce::AndroidDocumentPermission::getPersistedTime ( ) const
inline

The time when the permissions were persisted, in milliseconds since January 1, 1970 00:00:00.0 UTC.

References time.

◆ getUrl()

URL juce::AndroidDocumentPermission::getUrl ( ) const
inline

The url of the document with persisted permissions.

References url.

◆ isReadPermission()

bool juce::AndroidDocumentPermission::isReadPermission ( ) const
inline

True if the permission allows read access.

References read.

◆ isWritePermission()

bool juce::AndroidDocumentPermission::isWritePermission ( ) const
inline

True if the permission allows write access.

References write.

◆ releasePersistentReadWriteAccess()

static void juce::AndroidDocumentPermission::releasePersistentReadWriteAccess ( const URL )
static

Revokes persistent access to a document or tree.

◆ takePersistentReadWriteAccess()

static void juce::AndroidDocumentPermission::takePersistentReadWriteAccess ( const URL )
static

Gives your app access to a particular document or tree, even after the device is rebooted.

If you want to persist access to a folder selected through a native file chooser, make sure to pass the exact URL returned by the file picker. Do NOT call AndroidDocument::fromTree and then pass the result of getUrl to this function, as the resulting URL may differ from the result of the file picker.

Member Data Documentation

◆ read

bool juce::AndroidDocumentPermission::read = false
private

Referenced by isReadPermission().

◆ time

int64 juce::AndroidDocumentPermission::time = 0
private

Referenced by getPersistedTime().

◆ url

URL juce::AndroidDocumentPermission::url
private

Referenced by getUrl().

◆ write

bool juce::AndroidDocumentPermission::write = false
private

Referenced by isWritePermission().


The documentation for this class was generated from the following file: