title: Cordova plugins not working with Capacitor
body: <p>I’m not sure how to get Cordova plugins working with Ionic 4 + Capacitor in Android Emulator.</p>
  
  <p>I am following this example (<a href="https://ionicacademy.com/create-pdf-files-ionic-pdfmake/" rel="nofollow noreferrer">https://ionicacademy.com/create-pdf-files-ionic-pdfmake/</a>) but I am going to add some Capacitor plugins to it in order to use the camera to add images.</p>
  
  <p><strong>Do the Cordova plugins below still work with Capacitor?</strong> I can’t get them to work at all. They work fine using cordova rather than Capacitor.
  I have created project as follows:</p>
  
  <pre><code>ionic start myApp
  cd myApp
  npm install @capacitor/core @capacitor/cli
  npx cap init
  npm install pdfmake @ionic-native/file-opener @ionic-native/file 
  npm install cordova-plugin-file-opener2
  npm install cordova-plugin-file
  
  *Writes code*
  
  create myApp/www dir
  copied index.html to myApp/www dir
  npx cap add android
  npx cap update
  npx cap open android (opens android studio)
  ionic capacitor run android
  npx cap sync
  npx cap copy
  run in emulator from android studio
  </code></pre>
  
  <p><strong>Expected Result:</strong></p>
  
  <p>pdf is saved to device and is then opened.</p>
  
  <p><strong>Actual result:</strong></p>
  
  <p>No warnings or errors in console.<br>
  Fails on this on line and does not proceed:</p>
  
  <pre><code>this.file.writeFile(this.file.dataDirectory, 'myletter.pdf', blob, { replace: true }).then(fileEntry =&gt; {
  </code></pre>
  
  <p>Update:
  Warnings and error resolved but still not working</p>