Lecture 8: File Pickers and Media Pickers Flashcards

1
Q

What are advantages to using file pickers?

A
  • no special permissions
  • uses a standardized interface across all apps
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Rather than ask the user for permission to find a file, File pickers get the user to __ and use that as ___

A
  • find the file for us
  • implicit permission
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Using file pickers, its up to the user to decide __
then the system handles permissions for ___

A
  • what files the app gets access to specifically
  • accessing those files directly
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Due to the file picker being managed by the system and not the app the underlying app does not have ___

A

access to what the file picker can see

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Selected files are added to a __ and stored in __

A
  • DocumentProvider
  • A table along with who requested them and can access them
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Because the file picker interface is driven by existing DocumentProvider services on the Android device, it __

A

automatically integrates many other applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A Document Picker is just a subclass of __

A

ContentProvider

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

File pickers can be set up to pull from __ or __ storage

A
  • remote
  • app-organized
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When using a openFile() method to invoke a file picker UI what does it include?

A

A set of intents for the action that set certain parameters

A return code the activity will return when completed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the purpose of the return code?

A

Identifies which activity your running if your running multiple activities at once

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the purpose of an intent?

A

Lets android know:
- How you want to open a file
- What type of file youre looking for

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are 2 base intents file pickers use

A
  • ACTION_OPEN_DOCUMENT
  • ACTION_OPEN_DOCUMENT_TYPE
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the difference between ACTION_OPEN_DOCUMENT and ACTION_OPEN_DOCUMENT_TYPE?

A

ACTION_OPEN_DOCUMENT
Selects a specific file to open

ACTION_OPEN_DOCUMENT_TYPE
Give the app access to all files within a selected directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a content URI?

A

A URI that identifies data in a provider

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you resolve the content URI?

A

Use the ContentResolver with SQL parameters

or

getContentResolver().openInputStream(uri)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the difference between resolving a content uri and a file uri?

A

content: use ContentResolver
file: use standard java file methods

17
Q

What is the pre-built picker specifically for photos and videos?

A

PickVisualMedia