Skip to content

Crashes; user has no web browser installed and tries to open any URL #1156

@hismaeel

Description

@hismaeel

So I had disabled my web browser because I was using it a lot at bedtime. Because of this, I kept getting a "No Activity Found" exception for many/any click(s) that open a web browser, such as on click on license and category of a photo, "open in web browser" option, links in the about page, etc. The documentation for Intent actually reads this

> Caution: If there are no apps on the device that can receive the implicit intent, your app will crash when it calls startActivity()

The solution is simple and good code practice; start activity only after checking for null activity. Launch only if activity is not null, otherwise post a toast message, something like "no app found to open URL" (I've seen many other apps give me such a toast recently)

I've started working on this; Expect a pull request soon :-)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions