Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get URI of photo? #16

Closed
artworkad opened this issue May 4, 2017 · 1 comment
Closed

How to get URI of photo? #16

artworkad opened this issue May 4, 2017 · 1 comment

Comments

@artworkad
Copy link

After

photoResult.saveToFile(someFile)

how can I retrieve the URI of the saved image?

@Diolor
Copy link
Member

Diolor commented May 4, 2017

The File java class has your answer:

File file = new File(
        getExternalFilesDir("photos"),
        "photo.jpg"
);
photoResult.saveToFile(file);
file.toURI(); <-- here you go

Also see: https://github.com/Fotoapparat/Fotoapparat/blob/master/sample/src/main/java/io/fotoapparat/sample/MainActivity.java#L87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants