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

How do I use this plugin in an Ionic 4 app? #79

Open
ashish701ranjan opened this issue Jul 9, 2019 · 8 comments
Open

How do I use this plugin in an Ionic 4 app? #79

ashish701ranjan opened this issue Jul 9, 2019 · 8 comments

Comments

@ashish701ranjan
Copy link

ashish701ranjan commented Jul 9, 2019

This is my "package.json":

{
  "name": "ionic-whatsapp-mock",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ionic cordova run browser --live-reload",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^7.2.2",
    "@angular/core": "^7.2.2",
    "@angular/forms": "^7.2.2",
    "@angular/http": "^7.2.2",
    "@angular/platform-browser": "^7.2.2",
    "@angular/platform-browser-dynamic": "^7.2.2",
    "@angular/pwa": "^0.12.4",
    "@angular/router": "^7.2.2",
    "@angular/service-worker": "^7.2.2",
    "@ionic-native/call-number": "^5.8.0",
    "@ionic-native/camera": "^5.8.0",
    "@ionic-native/contacts": "^5.8.0",
    "@ionic-native/core": "^5.0.0",
    "@ionic-native/document-viewer": "^5.9.0",
    "@ionic-native/fcm": "^5.9.0",
    "@ionic-native/file": "^5.8.0",
    "@ionic-native/file-chooser": "^5.8.0",
    "@ionic-native/file-path": "^5.9.0",
    "@ionic-native/image-picker": "^5.8.0",
    "@ionic-native/media": "^5.8.0",
    "@ionic-native/media-capture": "^5.8.0",
    "@ionic-native/photo-viewer": "^5.8.0",
    "@ionic-native/splash-screen": "^5.0.0",
    "@ionic-native/status-bar": "^5.0.0",
    "@ionic/angular": "^4.1.0",
    "@ionic/storage": "^2.2.0",
    "@ngrx/effects": "^8.0.1",
    "@ngrx/store": "^8.0.1",
    "@ngrx/store-devtools": "^8.0.1",
    "@ngx-pwa/offline": "^6.2.0",
    "angular-in-memory-web-api": "^0.8.0",
    "call-number": "^1.0.1",
    "com-sarriaroman-photoviewer": "^1.2.2",
    "cordova-android": "8.0.0",
    "cordova-browser": "6.0.0",
    "cordova-plugin-camera": "^4.0.3",
    "cordova-plugin-contacts": "^3.0.1",
    "cordova-plugin-fcm-with-dependecy-updated": "^2.4.0",
    "cordova-plugin-file": "^6.0.1",
    "cordova-plugin-filechooser": "^1.2.0",
    "cordova-plugin-filepath": "^1.5.5",
    "cordova-plugin-media": "^5.0.2",
    "cordova-plugin-media-capture": "^3.0.2",
    "cordova-plugin-mediapicker-dmcsdk": "^2.4.5",
    "cordova-plugin-telerik-imagepicker": "^2.3.2",
    "core-js": "^2.5.4",
    "faker": "^4.1.0",
    "immer": "^3.1.3",
    "mx.ferreyra.callnumber": "0.0.2",
    "rxjs": "~6.5.1",
    "tslib": "^1.9.0",
    "zone.js": "~0.8.29"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.13.8",
    "@angular-devkit/build-angular": "~0.13.8",
    "@angular-devkit/core": "~7.3.8",
    "@angular-devkit/schematics": "~7.3.8",
    "@angular/cli": "~7.3.8",
    "@angular/compiler": "~7.2.2",
    "@angular/compiler-cli": "~7.2.2",
    "@angular/language-service": "~7.2.2",
    "@ionic/angular-toolkit": "~1.5.1",
    "@ionic/lab": "^2.0.5",
    "@types/faker": "^4.1.5",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~12.0.0",
    "codelyzer": "~4.5.0",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^4.1.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "ionic": "^5.1.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "tslint": "~5.17.0",
    "typescript": "~3.1.6"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-contacts": {},
      "cordova-plugin-filechooser": {},
      "mx.ferreyra.callnumber": {},
      "cordova-plugin-camera": {},
      "cordova-plugin-telerik-imagepicker": {},
      "cordova-plugin-media-capture": {},
      "cordova-plugin-media": {},
      "cordova-plugin-file": {},
      "call-number": {},
      "com-sarriaroman-photoviewer": {},
      "cordova-plugin-fcm-with-dependecy-updated": {},
      "cordova-plugin-document-viewer": {},
      "cordova-plugin-filepath": {}
    },
    "platforms": [
      "browser",
      "android"
    ]
  }
}

I could not find a way to include the files as:

<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>

I believe there is no Ionic-native wrapper for this. I am trying to use this plugin as an alternative of ImagePicker plugin. I have tried with declare var MediaPicker: any;
But this gives a Reference error for MediaPicker not defined when I use it in my functions. I also tried inspecting the window to see any reference of MediaPicker but could not see any. Can you please help me with this?

@DmcSDK
Copy link
Owner

DmcSDK commented Jul 15, 2019

"cordova-plugin-media": "^5.0.2", "cordova-plugin-media-capture": "^3.0.2", "cordova-plugin-mediapicker-dmcsdk": "^2.4.5", "cordova-plugin-telerik-imagepicker": "^2.3.2",
Maybe these are conflicting,you can try remove other plugin =》try run

@tamsel12
Copy link

tamsel12 commented Feb 10, 2020

"cordova-plugin-media": "^5.0.2", "cordova-plugin-media-capture": "^3.0.2", "cordova-plugin-mediapicker-dmcsdk": "^2.4.5", "cordova-plugin-telerik-imagepicker": "^2.3.2",
Maybe these are conflicting,you can try remove other plugin =》try run

@DmcSDK i have tried this , But not able to import . Could you share import statement for this

@DmcSDK
Copy link
Owner

DmcSDK commented Feb 11, 2020

@tamsel12 try remove this plugin cordova-plugin-telerik-imagepicker

@tamsel12
Copy link

tamsel12 commented Feb 11, 2020

@DmcSDK I reomved all the plugins that you have mentioned above but am not able to import the plugin

@08Thug
Copy link

08Thug commented Feb 11, 2020

i've also stuck with this issue @DmcSDK @tamsel12 @

@DmcSDK
Copy link
Owner

DmcSDK commented Feb 14, 2020

@ashish701ranjan @tamsel12 @08Thug is there no error log?

@tamsel12
Copy link

@DmcSDK yes , Not able to import

@vkyeswa
Copy link

vkyeswa commented Mar 31, 2021

@tamsel12 are you using capacitor?, coz i managed to use it there

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

No branches or pull requests

5 participants