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

MobileAccessibility doesn't recognize installed Cordova plugin #1860

Closed
janpio opened this issue Aug 3, 2017 · 1 comment
Closed

MobileAccessibility doesn't recognize installed Cordova plugin #1860

janpio opened this issue Aug 3, 2017 · 1 comment

Comments

@janpio
Copy link
Contributor

janpio commented Aug 3, 2017

I'm submitting a ...
[x] bug report
[ ] feature request

Current behavior:
Even if you install the MobileAccessibility by the docs it doesn't work on devices. It just doesn't recognize the installed (and working if used directly) Cordova plugin. You always get:

image

My guess: The pluginRef with MobileAccessibility is wrong and should be window.MobileAccessibility.

(I tried to fix this directly in the .js of the installed @ionic-native plugin, but that didn't work - so I am not sure and couldn't test this.)

Expected behavior:
Plugin works.

Steps to reproduce:
A project with both Ionic Native and direct access to the Cordova plugin is here: https://github.com/janpio/ionic-native-mobile-accessibility

Related code:

doesn't work:

     this.mobileAccessibility.getTextZoomCallback().then(res => {
        console.log('his.mobileAccessibility.getTextZoomCallback ', JSON.stringify(res));
      });

does work:

      function getTextZoomCallback(textZoom) {
        console.log('Current text zoom = ' + textZoom + '%')
      }
      window.MobileAccessibility.getTextZoom(getTextZoomCallback);
@KiwiKilian
Copy link

Can confirm this problem. When using window.MobileAcessiblity it does give me correct results in iOS Simulator, but also throwing an error Property 'MobileAccessibility' does not exist on type 'Window'..

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

No branches or pull requests

3 participants