Skip to content

Commit

Permalink
Wrap the code that mocks the camera with a try-catch clause (#375)
Browse files Browse the repository at this point in the history
Co-authored-by: Bernat Borrás Paronella <[email protected]>
  • Loading branch information
rocboronat and alorma authored Jul 5, 2021
1 parent c2b1810 commit 18e7974
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,13 @@ Mocking the Android Camera Intent is a tricky thing to do. To accomplish it in n
Here's an example to copy paste:

```java
Intents.init();
mockAndroidCamera();
clickOn(R.id.launch_camera);
Intents.release();
try {
Intents.init();
BaristaIntents.mockAndroidCamera();
clickOn(R.id.launch_camera);
} finally {
Intents.release();
}
```

## Runtime Permissions
Expand Down

0 comments on commit 18e7974

Please sign in to comment.