Skip to content
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

Android: possible crash calling RNWootric.configureWithClientID() #11

Open
niparx opened this issue Jul 25, 2019 · 0 comments
Open

Android: possible crash calling RNWootric.configureWithClientID() #11

niparx opened this issue Jul 25, 2019 · 0 comments

Comments

@niparx
Copy link

niparx commented Jul 25, 2019

Here is an implementation of configureWithClientID() method:

@ReactMethod
  public void configureWithClientID(String clientId, String accountToken) {  
    wootric = Wootric.init(getCurrentActivity(), clientId, accountToken);  
  }  

As we can see, getCurrentActivity() method is called, which can return null value: link

Let's go and see, how Wootric.init() is implemented: link

And, as we can see, activity parameter does not accept null values: it throws and exception, when such case occurs.

I suppose, implementation of configureWithClientID() need to be changed. At least Wootric.init() should not not accept nullable parameters.

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

No branches or pull requests

1 participant