Alpha Video Training
Page 1 of 2 12 LastLast
Results 1 to 30 of 31

Thread: Active Phone number on smart phone?

  1. #1
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Active Phone number on smart phone?

    I am not deploying my experiments in V12 yet (for a good reason), so I just wanted to ask whether smart phones can detect that a field in a grid component that is an embedded component in a panel has a phone number in it.. so that when user clicks it on a smart phone, it does the 'call' thing. Is there something I should be setting in the phone number field on my grid to make this happen?

    UPDATE: To save someone from reading through the trial and errors in this thread, the answer to my question was to put the following javascript code in the OnClick event of the phone number field on my embedded read-only grid:

    Code:
    \\In this case, MOBILE is the name of the field that holds the phone number.
    var pno = {grid.object}.getValue('G','MOBILE',{grid.rowNumber});
    
    if (A5.flags.supportsTouch !=false) {
    	window.location = 'tel:'+pno;
    } else {
    	alert('Not running on a mobile phone device.');
    }
    Last edited by kingcarol; 06-21-2013 at 03:45 PM.
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  2. #2
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,445

    Default Re: Active Phone number on smart phone?

    Hi Carol,

    I would think you want some sort of button that does the 'call' thing, otherwise any clicking in the field to edit/add would start calling the number. Not sure how you would access the 'call' thing though. It's probably different between Android, blackberry, iphone and windows phone.

  3. #3
    "Certified" Alphaholic
    Real Name
    Bill Griffin
    Join Date
    Jul 2001
    Location
    Edgewood, NY
    Posts
    1,201

    Default Re: Active Phone number on smart phone?

    On IOS devices (and I think android as well) you do not have to do anything other than display a phone number. Every site(whether its a mobile site or not) If I touch a phone number I am given the opportunity to call or not (cancel)
    Bill Griffin
    Parkell, Inc

  4. #4
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,445

    Default Re: Active Phone number on smart phone?

    Hi Bill,

    That works if the number is part of the web page, but if it is a field in a form on a web page it does not. You just get to edit the number that is in the field.

  5. #5
    "Certified" Alphaholic
    Real Name
    Bill Griffin
    Join Date
    Jul 2001
    Location
    Edgewood, NY
    Posts
    1,201

    Default Re: Active Phone number on smart phone?

    You are correct sir....
    Bill Griffin
    Parkell, Inc

  6. #6
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Re: Active Phone number on smart phone?

    So it sounds like I should take the grid I have in the panel and make an a5w page from the grid and put that in the panel. It's a non-updateable grid anyway, so I'll try that.
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  7. #7
    "Certified" Alphaholic
    Real Name
    Bill Griffin
    Join Date
    Jul 2001
    Location
    Edgewood, NY
    Posts
    1,201

    Default Re: Active Phone number on smart phone?

    Not sure if that will work( even though theoretically it should), but its worth a shot.
    Bill Griffin
    Parkell, Inc

  8. #8
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Re: Active Phone number on smart phone?

    Just tried putting the grid in a page, and encountered various sizing, filtering, etc. obstacles with it in a panel. ANYWAY, would rather find out use a 'Call' button on the panel header where grid is embedded (as Lance mentioned). Any more ideas out there?

    Hmmm, I'm thinking that I might need to set a session variable in Xbasic that contains the phone number and send it into a page that is then opened in an IFrame panel.
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  9. #9
    "Certified" Alphaholic
    Real Name
    Bill Griffin
    Join Date
    Jul 2001
    Location
    Edgewood, NY
    Posts
    1,201

    Default Re: Active Phone number on smart phone?

    This shouldn't be that difficult to do, yet.... I tried a couple of things, but to no avail. I am in contact with Bob Moore. I will let you know what I find out.
    Bill Griffin
    Parkell, Inc

  10. #10
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Re: Active Phone number on smart phone?

    I've tried a bit, too. Having trouble getting the page I made to update the data in the session variable I'm using to send in the phone number. When 'Call' button clicked on panel, I call an Xbasic function that does an sql query to get the phone number where the contact id is supplied from a Contacts list object. It returns the phone number in the result set. Then the function sets a session variable to that phone number. Then the function sets focus to the panel with the page in it. The page has this on it: <%A5 ? session.ContactHomePhone %> The page displays a phone number, but it keeps remembering a previous value. I check marked that the page embedded in a panel should 'Refresh When Panel Card Gets Focus' but that's not helping. If I go back to Design Mode and then to Live Preview again, THEN I see the phone number value for the last contact selected in the contact list from LAST live preview.

    I have verified that the session variable does get set to the proper value in the xbasic function by having the function pop up a message that shows the value. But somehow that doesn't get updated when setting focus to the panel with the page embedded in it.
    Last edited by kingcarol; 06-20-2013 at 12:23 PM.
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  11. #11
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Re: Active Phone number on smart phone?

    So... for your thrilling entertainment of the day, I did a little video to show where I was at so far and trouble I'm having with session variables: http://screencast.com/t/oLwBMy9kp
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  12. #12
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Re: Active Phone number on smart phone?

    Update: It appears that my session variable issue has been resolved by check marking 'Delay Render Until Visible' in the properties for my embedded a5w page of phone numbers.
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  13. #13
    "Certified" Alphaholic
    Real Name
    Bill Griffin
    Join Date
    Jul 2001
    Location
    Edgewood, NY
    Posts
    1,201

    Default Re: Active Phone number on smart phone?

    Check out this video from Bob More: http://youtu.be/E8i899iDyKc

    I think after you watch this you will be able to simplify what you are doing..
    Last edited by Bill Griffin; 06-21-2013 at 08:46 AM.
    Bill Griffin
    Parkell, Inc

  14. #14
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,445

    Default Re: Active Phone number on smart phone?

    That's really cool! And it taught me things as well.

  15. #15
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Re: Active Phone number on smart phone?

    Just watched Bob's video. Yes, Cool! Dumb question... when he shows the javascript in the List Events, is this line:
    window.location = 'tel:'+this.value;
    telling a touch device that this is a phone number? ie, is the prefix 'tel:' triggering the touch device to pop up the little Call window?
    Last edited by kingcarol; 06-21-2013 at 11:06 AM.
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  16. #16
    "Certified" Alphaholic
    Real Name
    Bill Griffin
    Join Date
    Jul 2001
    Location
    Edgewood, NY
    Posts
    1,201

    Default Re: Active Phone number on smart phone?

    Yes
    Bill Griffin
    Parkell, Inc

  17. #17
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Re: Active Phone number on smart phone?

    So, I'm thinking that if I put this javascript in the OnClick property of a phone number field in a grid that is embedded in a panel, then simply clicking the phone number will cause a mobile phone device to pop up that Call window. I have put the code there, but am unable to test on a mobile device because I'm not ready to install V12 on my server, AND I can't figure out how to get the 'Remote Test' thing to work.. (too ignorant of that stuff, I think).

    Code:
    if (A5.flags.supportsTouch !=false) {
    	window.location = 'tel:'+this.value;
    } else {
    	alert('Not running on a mobile phone device.');
    }
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  18. #18
    "Certified" Alphaholic
    Real Name
    Bill Griffin
    Join Date
    Jul 2001
    Location
    Edgewood, NY
    Posts
    1,201

    Default Re: Active Phone number on smart phone?

    I don't think that will work unless you have set this.value somewhere. It should be referencing the value on your grid, or better yet your UX component. The this.value comes from the list component.

    DO you have a smart phone that is on the same network as your a5 developer? you need a QR scanner (I use something called Scan) on my iphone) and jusr scan the QR code and your browser will open the page
    Bill Griffin
    Parkell, Inc

  19. #19
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Re: Active Phone number on smart phone?

    Hi, Bill. Yep, I figured I would have to get the value in the field and not use this.value... I know how to do that. BUT, regarding the Remote Test, I can't even get as far as you are suggesting because it errors right away and cannot write to a file of some kind. Short video: http://screencast.com/t/xDv6H3nTsSZ
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  20. #20
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,445

    Default Re: Active Phone number on smart phone?

    Just tried it Carol and it works! I copied your code and put it in the onclick event for the phone field in a read only grid.

    I would, however, use a list control instead of a grid now you are moving to V12. They are so much more flexible and the appearances you can create are great.

    Ignore the above, spoke too soon. Like Bill says the this value does not return the correct phone number.

    Will try something else shortly

  21. #21
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Re: Active Phone number on smart phone?

    That's good to know, Lance. I'm using an embedded grid because I need to display address, email, type of contact, and several phone numbers for my contacts in one spot. I ended up deciding I did not want to make a bunch of list controls to return the different phone number values..but maybe I'll learn more and decide to use list controls later. I just started out trying V12 so have a lot to learn.

    Now if I can just figure out how to do a Remote Test...
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  22. #22
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,445

    Default Re: Active Phone number on smart phone?

    Okay,

    changed the code to
    Code:
    var pno = {grid.object}.getValue('G','MOBILE',{grid.rowNumber});
    
    
    
    if (A5.flags.supportsTouch !=false) {
    	window.location = 'tel:'+pno;
    } else {
    	alert('Not running on a mobile phone device.');
    }
    Where MOBILE is the phone number field and all works fine

  23. #23
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Re: Active Phone number on smart phone?

    This forum is so great! We managed to get to the simple answer to my first question in this thread! YAYYY.
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  24. #24
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,445

    Default Re: Active Phone number on smart phone?

    For some reason I cannot upload a picture anymore! So this maybe harder to explain. Go to the remote test button and fast preview. Then when the dialog is open select QR code as the output. Then under Host name settings select IP Address, an input box pops up, then press the show IP address of my machine link, another dialog pops up showing a numeric IP address, copy that into the input box next to IP Address then select Ok. You should get the QR code ready to scan with your phone

  25. #25
    "Certified" Alphaholic
    Real Name
    Bill Griffin
    Join Date
    Jul 2001
    Location
    Edgewood, NY
    Posts
    1,201

    Default Re: Active Phone number on smart phone?

    Are you running Windows 8? I get the same error on my windows 8 box but my win 7 is fine. I sent a bug report in.

    Bill
    Bill Griffin
    Parkell, Inc

  26. #26
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Re: Active Phone number on smart phone?

    Are you asking me, Bill? I have windows 7.
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  27. #27
    "Certified" Alphaholic
    Real Name
    Bill Griffin
    Join Date
    Jul 2001
    Location
    Edgewood, NY
    Posts
    1,201

    Default Re: Active Phone number on smart phone?

    Sorry Carol, yes I was asking you.
    Bill Griffin
    Parkell, Inc

  28. #28
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Re: Active Phone number on smart phone?

    Bill, I was able to get the Remote Test thing to start working. I studied the path in the error message that it said it could not write file to and then followed that path in Windows Explorer and found that there was NOT a RemoteTest folder in the last folder in the path. So I created the folder. Then it started working.

    C:\Users\Owner1\AppData\Roaming\Alpha Software\Alpha Anywhere Version 12\Installations\CProgramFilesx86a5V12\RemoteTest\
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

  29. #29
    "Certified" Alphaholic
    Real Name
    Bill Griffin
    Join Date
    Jul 2001
    Location
    Edgewood, NY
    Posts
    1,201

    Default Re: Active Phone number on smart phone?

    Cool , I was able to get rid of that message and have another, but it is only on my win 8 system. Were you able to get your phone test done?
    Bill Griffin
    Parkell, Inc

  30. #30
    "Certified" Alphaholic kingcarol's Avatar
    Real Name
    Carol King
    Join Date
    Jun 2010
    Posts
    1,533

    Default Re: Active Phone number on smart phone?

    Yes, Bill! The solution was to put the last javascript code Lance posted above in the OnClick property for the phone field in the read-only grid that I have embedded in a panel. It works beautifully. Bill, Thank you so much for posting Bob Moore's video (and tell him thanks)! It definitely pointed Lance and I in the right direction.
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

Similar Threads

  1. how to fetch mobile number from a smart phone
    By sofist2010 in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 11-26-2012, 03:48 AM
  2. Create a Separate Smart Phone Login
    By ssmoore1 in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 04-12-2011, 07:21 PM
  3. Smart phone
    By Thontlb in forum Web Application Server v7
    Replies: 0
    Last Post: 09-08-2008, 12:48 PM
  4. Replies: 10
    Last Post: 08-01-2007, 10:33 PM
  5. phone number mask
    By Richard Mendrala in forum Alpha Five Version 6
    Replies: 3
    Last Post: 04-21-2005, 05:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •