-
Notifications
You must be signed in to change notification settings - Fork 117
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
Return text error #43
Comments
Not sure why it would throw an error at all if I just want to know yes or no (or true or false). In our case it is NOT an error if some app isn't present, it's just to determine if to take another road to update the app. The Plugin could just return true or false and throw exceptions if some actually occurred. Which is the better software design anyways. |
Agree. |
You could just use the „Old Approach“ described in README.md. |
That would be up to the Ionic Native Team then, because I proxy to this plugin through them: https://ionicframework.com/docs/native/app-availability/ Unfortunately they don't use checkBool(). I also fail to see why you changed the original Android API semantics to something throwing an exception instead of returning a perfectly valid "false" value. Where's the benefit in that? |
Hello,
I am using this plugin with ionic and it is working with promises.
The resolve is called on success callback and the reject on callback failure
Rejecting a promise with empty error could be problematic if we want to perform some logic. Here is an example:
Here we can see that if doSomething reject as well with "" we cannot perform logic.
Is it possible to add a text in the error:
Example: "app_not_available"
https://github.com/ohh2ahh/AppAvailability/blob/master/src/android/AppAvailability.java#L42
For IOS I don't know how it works...
The text was updated successfully, but these errors were encountered: