Open hamjad-centenum opened 2 days ago
May i ask, do you build cordova project or capacitor project? Because i can't compile capacitor project at all.
May i ask, do you build cordova project or capacitor project? Because i can't compile capacitor project at all.
Capacitor
I added plugin via npm as usual, try to use cordova.plugins.health (should be available globally), then ionic build , and get error, cordova is not defined. What can i miss? If i understand it, i can maybe come near to your case.
I added plugin via npm as usual, try to use cordova.plugins.health (should be available globally), then ionic build , and get error, cordova is not defined. What can i miss? If i understand it, i can maybe come near to your case.
can you share your code?
Very simply, in component
const res = await cordova.plugins.health.isAvailable();
And it causes compiling error error TS2304: Cannot find name 'cordova'.
Have i to import anything in component?
Very simply, in component
const res = await cordova.plugins.health.isAvailable();
And it causes compiling error error TS2304: Cannot find name 'cordova'.
Have i to import anything in component?
No you do not have to import anything, cordova.plugins.health
is exposed globally at build time. what framework are you working with
i work with ionic / angular (standalone components).
i work with ionic / angular (standalone components).
oh i typically do not use angular but maybe you should create a private
function in a service then import that into your component
I could use your help. requestAuthorization returning
Cannot read request objectValue ["steps","distance","calories"] at 0 of type org.json.JSONArray cannot be converted to JSONObject
. Do you have an idea why this could be happening ?Here is my implementation