Capacitor context issue

Hi , I am building a capacitor plugin for the minew sdk to get and receive beacon data.

I have the ios part working great but I have hit an issue with Andriod.

My plugin code is

    public void startScan(PluginCall call) {
   mMtCentralManager = MTCentralManager.getInstance( this); 
}

The error reads
Required Type: Context
Provided" MinewPlugin

How do I get the correct context so I can attach an instance of this method?

1 Like

Context on Android refers to the Android Context. getApplicationContext() is probably the function that you want.

Hello!!

How do you read temperature and humidity with ionic? I am using the BLE library to read the data from the minew s1 but I am getting Chinese characters for a service UUID and a characteristic UUID .

Thanks for your time.