1 Reply Latest reply on Apr 28, 2016 8:20 AM by kerrishotts

    PhoneGap CLI project won't bring up dialer/sms/email...and no error messages

    Glitchens

      Here is the code thus far. Let me know if I am missing some piece of the puzzle.

       

      CSP Meta -

       


      <meta http-equiv="Content-Security-Policy"
      content="default-src *;
      style-src 'self' 'unsafe-inline' 'unsafe-eval';
      script-src 'self' 'unsafe-inline' 'unsafe-eval';">

       

      js code -

       


      document.location.href = 'tel:1-913-484-9948';
      window.plugins.CallNumber.callNumber(onSuccess, onError, number, 1);

       

      config.xml


      <content src="index.html" />
      <plugin name="cordova-plugin-whitelist" spec="1" />
      <access origin="tel:*" launch-external="yes"/>
      <access origin="sms:*" launch-external="yes"/>
      <access origin="mailto:*" launch-external="yes"/>
      <access origin="geo:*" launch-external="yes" />
      <allow-intent href="http://*/*" />
      <allow-intent href="https://*/*" />
      <allow-intent href="tel:*" />
      <allow-intent href="sms:*" />
      <allow-intent href="mailto:*" />
      <allow-intent href="geo:*" />

      <platform name="android">
      <allow-intent href="market:*" />
      <allow-intent href="tel:*" />
      <allow-intent href="sms:*" />
      <allow-intent href="mailto:*" />
      <allow-intent href="geo:*" />
      </platform>
      <platform name="ios">
      <allow-intent href="itms:*" />
      <allow-intent href="itms-apps:*" />
      </platform>
      <preference name="Orientation" value="portrait" />
      <engine name="android" spec="~4.1.1" />
      <preference name="android-minSdkVersion" value="14" />
      <engine name="ios" spec="~3.9.2" />
      </widget>

        • 1. Re: PhoneGap CLI project won't bring up dialer/sms/email...and no error messages
          kerrishotts Adobe Community Professional

          I don't see that the CallNumber plugin is installed. If it is, you should ensure that it is saved to your config.xml via "cordova plugin add ... --save".  If you're intending on using CallNumber, then I'd comment out the location.href line.

           

          The allow-intent for tel: in your config.xml file should be sufficient; I'd remove the access-origin lines for tel:.

           

          Of course, you might also not ever be executing the code you've listed. You can use a debugger or console.log("...") to verify that you are getting to the right portion of your code.