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

Import Polar BLE on Meta Quest 3 #497

Open
2 of 10 tasks
PaoloSalvatico opened this issue Nov 4, 2024 · 0 comments
Open
2 of 10 tasks

Import Polar BLE on Meta Quest 3 #497

PaoloSalvatico opened this issue Nov 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@PaoloSalvatico
Copy link

PaoloSalvatico commented Nov 4, 2024

Platform on which you observed the bug:

  • Android
  • iOS
  • Other
  • Platform is not relevant for this bug

Device on which you observed the bug:

  • Polar OH1
  • Polar Verity Sense
  • Polar H10
  • Polar H9
  • Other
  • Device is not relevant for this bug

Describe the bug
I have sucessfully build an apk to be opened on Meta Quest 3, i used Unity 6 editor cause i needed a version of android NDK high enough to support polar sdk, the probles is that after i open the apk file on quest3 the InitializePolarBleSdk()() function returns the following error: "Error initializing Polar BLE SDK: java.lang.ClassNotFoundException;com.polar.sdk.api.PolarBleApiDefaultImpl Polar BLE Manager is only supported on Android devices."

How to Reproduce
This is the function incriminted i took from the demo in polar sdk:

void InitializePolarBleSdk()
{
try
{
// Get the current Android Activity
using (AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
{
context = unityPlayer.GetStatic("currentActivity");
}

        // Create an instance of PolarBleApi
        using (AndroidJavaClass polarBleApiClass = new AndroidJavaClass("com.polar.sdk.api.PolarBleApiDefaultImpl"))
        {
            // Set the features you want to use
            var features = new AndroidJavaObject("java.util.HashSet");
            features.Call<bool>("add", "FEATURE_HR");

            // Get default implementation
            polarBleSdk = polarBleApiClass.CallStatic<AndroidJavaObject>("defaultImplementation", context, features);
        }

        // Set API callback
        SetApiCallback();
    }
    catch (Exception ex)
    {
        UpdateStatus("Error initializing Polar BLE SDK: " + ex.Message);
    }
}

Expected behavior
Meta should be an Android device, my question is: Did i miss something or polr sdk doesn't work with Quest 3?
Thanks

@PaoloSalvatico PaoloSalvatico added the bug Something isn't working label Nov 4, 2024
@PaoloSalvatico PaoloSalvatico changed the title Import Pole BLE on Meta Quest 3 Import Polar BLE on Meta Quest 3 Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant