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

Gettign setPermissionDelegate error while implementing in React native 0.72 with Java folders #108

Closed
codewithhannan opened this issue Jun 27, 2024 · 1 comment

Comments

@codewithhannan
Copy link

I am using React Native 0.72 and have Java folders but the documentation shows kotlin configurations

I have added everything from documentation but in

HealthConnectPermissionDelegate.setPermissionDelegate(this); it is not building my app.

Tried to run it with Android Studio it gives following error .
Anyone can help on that?
Screenshot 2024-06-27 at 6 39 13 PM

@matinzd matinzd linked a pull request Jun 29, 2024 that will close this issue
@matinzd
Copy link
Owner

matinzd commented Jun 29, 2024

You can do this instead:

  @Override
  public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // In order to handle contract results, we need to set the permission delegate.
    HealthConnectPermissionDelegate.INSTANCE.setPermissionDelegate(this, "com.google.android.apps.healthdata");
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants