facebook

Phoneui.callPhone Web app works fine but Native dont

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #345032 Reply

    I have designed a web app that use phoneui.callPhone function to dial a number when you push a button. It works fine as a web app but if i try to build it as a native ios app, i m able to open the app but the button dont trigger the phone… Any idea?
    Thanks!
    Here’s the code i use for one of the buttons when ”on click” ,”run java script”
    phoneui.callPhone(‘18003227937,1,,,’ + (localStorage.getItem(‘D1’)) + ‘#,’ + (localStorage.getItem(‘D2’)) + ‘#,,3,2’ );

    #345033

    Paul_paul
    Participant
    #345060

    Hi Martin,

    Could you try something simpler like phoneui.callPhone(“123456789”) in both native and web app to isolate the problem to this function? Also, can you share your device model and iOS version?

    #345062

    I tried a button with the mobione ‘dial phone’ action with a phone number and that work in web and native app. The problem i have is that i have to insert in the phone number values stored in local storage.(see code sample from previous post) I dont think i can do that with the dial phone action(correct me if im wrong) i use the app on a iphone 4s on ios 6.1.3.
    Thanks for your help

    #345067

    Hi Martin,

    Have you debugged your project to know if your localstorage variables are not null? I suspect that this might cause an issue. If the problem continues could you share a sample design that help us replicate the issue?

    #345069

    i dont think the localstorage values are null since when I re open the app the values entered before are resotred(from local storage). See attached app code. Basically you enter a value in the sso (employee number) field and a password and the app will route you in the 1800# phone tree directly to where you want to go by using the button. The employee number and password are saved and restored with local storage. I Have added a button (called button) at the bottom that use the dial phone action with a number to test and this works in native mode…but dont allow me to input values from local storage…

    Attachments:
    You must be logged in to view attached files.
    #345350

    Hi Martin,

    I have received input from the dev team. Could you add a phoneui.alert() before dialing numbers to show them? We beleive they are not formatted correctly.

    #345401

    Hi,
    I did try the phoneui.alert with the same string as what’s in my phoneui.callPhone. The alert window display the values correctly but the phone nevers open… See pictures of alert window display…

    Here’s the code for the button i’ve modified to display the alert

    phoneui.alert(‘18003217937,1,,,’ + (localStorage.getItem(‘D1’)) + ‘#,’ + (localStorage.getItem(‘D2’)) + ‘#,,3,2’ );
    phoneui.callPhone(‘18003217937,1,,,’ + (localStorage.getItem(‘D1’)) + ‘#,’ + (localStorage.getItem(‘D2’)) + ‘#,,3,2’ );

    Attachments:
    You must be logged in to view attached files.
    #345408

    support-michael
    Keymaster

    >The alert window display the values correctly but the phone nevers open

    If the dialing application does not activate this is usually caused by providing an invalid phone number. You can test this by trying a basic local phone number with no extensions and AT code.

    #345409

    This code open the phone and dial properly when used as a web app. It does not work when i build it as a native app. If i put a simple phone number with no variables from local storage embedded in the phone number it work in web app and native app. There must be something happening to the code when generating the ipa file that does not work properly with the variables…

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Phoneui.callPhone Web app works fine but Native dont

You must be logged in to post in the forum log in