Automattic / Automattic/simplenote-android
App crashes when there is not external activities that matches intent
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 318
- Avg merge
- 15h 23m
- Merged PRs (30d)
- 5
Description
Avoid crashing when calling external activities and the phone doesn't have any matching activity.
### Expected
Show a Toast that the phone doesn't have a matching activity.
### Observed
Crashes. For example, this crash when exporting notes:
```
No Activity found to handle Intent { act=android.intent.action.CREATE_DOCUMENT cat=[android.intent.category.OPENABLE] typ=application/json (has extras) }
```
### Reproduced
**Note:** the device doesn't have to have a file manager app.
1. Go to Settings
2. Tap on Export Notes
3. See the app crashes
Device Make: Motorola
Device Model: Moto G 2014
Android Version: 7.1.2
Simplenote Version: 2.19
Contributor guide
Research direction
Start from Settings > Export Notes and trace the external activity launch that handles the CREATE_DOCUMENT intent. Reproduce on a device without a matching file manager, then verify that exporting notes shows a Toast explaining that no matching activity is available instead of crashing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100