danielehrhardt / cordova-plugin-extended-device-information

7 stars 8 forks source link

Plugin not found - IONIC 4 #9

Open SVANNER opened 5 years ago

SVANNER commented 5 years ago

Hi, I get the following error trying to access any of the function of the plugin:

Native: tried calling ExtendedDeviceInformation.memory, but the ExtendedDeviceInformation plugin is not installed.

The plugin is present when running ionic cordova plugin list:

cordova-plugin-extended-device-information 2.2.0 "ExtendedDeviceInformation" I have the following in my app.module.ts:

import { ExtendedDeviceInformation } from '@ionic-native/extended-device-information/ngx'; providers: [ ... ExtendedDeviceInformation,

I am testing on a Galaxy S8+ with Android 9 (Pie)

Here is my Ionic Info:

Ionic:

Ionic CLI : 5.2.3 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.4.2 @angular-devkit/build-angular : 0.13.9 @angular-devkit/schematics : 7.3.9 @angular/cli : 7.3.9 @ionic/angular-toolkit : 1.5.1

Cordova:

Cordova CLI : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : not available Cordova Plugins : not available

Utility:

cordova-res : not installed native-run : 0.2.6 (update available: 0.2.8)

System:

Android SDK Tools : 26.1.1 (/home/stephane/Android/Sdk) NodeJS : v10.15.2 (/usr/bin/node) npm : 6.10.2 OS : Linux 5.0 Thanks a lot !

crawft commented 5 years ago

Same here on Ionic 3

aosifre commented 4 years ago

Same problem on Ionic 4.

aosifre commented 4 years ago

Someone is answering me on the forum. (no solution yet).

https://forum.ionicframework.com/t/extended-device-information/183631/3

rolinger commented 3 years ago

What was the solution to this? I am having a similar issue on my Ionic v1 app using the cordova-plugin-deviceinformation - which also shows extended information. My plugin is there as well, not certain whats happening.

shyamPindoria commented 3 years ago

Late reply but leaving this here for anyone looking for a workaround. You can call the Cordova plugin directly like this:

declare var cordova: any;

@Injectable()

export class YourClass {

    totalStorage = cordova.plugins['extended-device-information'].totalstorage;

}
GhoshWorld commented 3 years ago

@shyamPindoria Thank you so much

Late reply but leaving this here for anyone looking for a workaround. You can call the Cordova plugin directly like this:

declare var cordova: any;

@Injectable()

export class YourClass {

    totalStorage = cordova.plugins['extended-device-information'].totalstorage;

}

Thank you so much. This is work for me