Skip to content

Conversation

@erikogenvik
Copy link

The main cause for this is that FlicManager.getInstance can
throw a couple of runtime exceptions, amongst them
AppCredentialsNotProvidedException and FlicAppNotInstalledException
which if not caught will crash the app.
This allows the concrete broadcast to catch and process these exceptions,
without crashing the app.

(Another option would be to handle the exceptions in the FlicLib. But for our project we actually want to handle the exceptions ourselves.)

In general a more preferred option would be to not provide this as a class inheriting from BroadcastReceiver but instead provide a BroadcastHandler class, which accepted a callback interface.

The main cause for this is that FlicManager.getInstance can
throw a couple of runtime exceptions, amongst them
AppCredentialsNotProvidedException and FlicAppNotInstalledException
which if not caught will crash the app.
This allows the concrete broadcast to catch and process these exceptions,
without crashing the app.
@Haves1001
Copy link

Haves1001 commented Aug 17, 2017

I get the same error when implenting the broadcast receiver.
Is there a reason why this isn't merged @Emill ?

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

Successfully merging this pull request may close these issues.

2 participants