1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    13
    Vote Rating
    3
    fousheezy is on a distinguished road

      0  

    Default Unanswered: Using device phone/browser

    Unanswered: Using device phone/browser


    I am trying to make buttons to
    1. call a phone number
    2. send an email
    3. open a web page in the device's browser
    However the solutions I have found on Stack Overflow have not worked. The button press results in the app displaying a 'this page cannot be displayed' panel from which there is no escape.

    So far I have tried this (each in a respective button handler)

    Code:
    ...
    window.location.href = 'tel:9999999999';
    ...
    window.location.href = 'mailto:test@me.com';
    ...
    window.location.href = 'http://google.com'
    ...
    Then I tried it without the .href

    Code:
    ...
    window.location = 'tel:9999999999';
    ...
    window.location = 'mailto:test@me.com';
    ...
    window.location = 'http://google.com'
    ...
    Finally I tried using window.open
    Code:
    ...
    window.open('tel:9999999999');
    ...
    window.open('mailto:test@me.com');
    ...
    window.open('http://google.com');
    ...
    But all of these produced the same 'page cannot be displayed' result. How are you supposed to send emails, make phone calls and open webpages in Sencha?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,120
    Vote Rating
    453
    Answers
    3160
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    This is up to the native packager to allow or support. We are doing some work currently with URI schemas for our native packager.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    755
    Vote Rating
    32
    Answers
    71
    Farish has a spectacular aura about Farish has a spectacular aura about

      0  

    Default


    with Cordova (PhoneGap), document.location.href = 'tel:+phoneNumber' works on Android. It might not work on iOS5 but from a little searching, i found that there is a plugin available for it.

  4. #4
    Sencha User
    Join Date
    Aug 2010
    Posts
    297
    Vote Rating
    3
    Answers
    3
    steve1964 is on a distinguished road

      0  

    Default


    Hi, to open external link in Phonegap use the chidlBrowser plugin (for both iOS and Android):
    https://github.com/phonegap/phonegap-plugins
    The Phonegap Plugin for iOS to dial a number (works for me):
    https://github.com/j-mcnally/PhoneGap-ios-PhoneDialer