1. #1
    Ext User
    Join Date
    Jul 2010
    Posts
    11
    Vote Rating
    0
    toe is on a distinguished road

      0  

    Default Make a button make a phone call

    Make a button make a phone call


    Hello,
    I am developing an Android App and I have a buy now button that I want to make a phone call. Does anyone have any advice on this? I have looked through the source and in the documentation and I can not find anything that will allow me to make a button initiate a phone call.

    Any help would be greatly appreciated.

    Thanks,
    -toe

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,360
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    i know that links on the iphone can be tapped and initiate a phone call. I don't know how you can synthesize that - it seems like huge security issue.

  3. #3
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,360
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    maybe make a link look like a button via background.

  4. #4
    Ext User
    Join Date
    Jul 2010
    Posts
    11
    Vote Rating
    0
    toe is on a distinguished road

      0  

    Default


    Thanks for the response. I tried the link idea and that did not work. I just used a simple href and nothing in the panel is actually clickable. Any more ideas?

  5. #5
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,360
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    I would first do research and see if any of it is at all possible on the andriod. This is not a sencha touch issue.

  6. #6
    Ext User
    Join Date
    Jul 2010
    Posts
    11
    Vote Rating
    0
    toe is on a distinguished road

      0  

    Default


    We just did a test. If we just have html and put a phone number we can click it and initiate a phone call. In Sencha that is disabled. I am not sure if it has to do with the way the divs are being made clickable and not the content. Does that makes sense? Is there a way to make the content inside of a panel clickable? Like hrefs, imgs, etc...

    Thanks,
    -toe

  7. #7
    Ext User
    Join Date
    Jul 2010
    Posts
    11
    Vote Rating
    0
    toe is on a distinguished road

      0  

    Default


    I just tested the app in my iPhone and it works just fine and as expected. The Android is the one that is having the issue. I am using the default browser, it is it just not allowing me to click the phone number. It will work on the Android if it is just HTML, but not with sencha. Right now I am using the overlays example. I just replaced the content with a phone number.

  8. #8
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,360
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    interesting. Can you put together a simple test case? Maybe it's a bug or something.

  9. #9
    Ext User
    Join Date
    Jul 2010
    Posts
    11
    Vote Rating
    0
    toe is on a distinguished road

      0  

    Default


    Sure thing.

    This code works for my iPhone but does not work on my Android. Nothing is clickable.

    Here is my HTML
    Code:
    <!DOCTYPE html>
    <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
      <title>Overlay</title>
      <link rel="stylesheet" href="../css/ext-touch.css" type="text/css" />
      <script type="text/javascript" src="../js/ext-touch.js"></script>
      <script type="text/javascript" src="index.js"></script>
    </head>
    
    <body>
      <div style="display: none;">
        <div id="lipsum">
          <p>CALL 1-865-656-1200</p>
          
        </div>
      </div>
    </body>
    </html>
    Here is my javascript. This is the code from the overlays example code.
    Code:
    Ext.setup({
        icon: 'icon.png',
        glossOnIcon: false,
        tabletStartupScreen: 'tablet_startup.png',
        phoneStartupScreen: 'phone_startup.png',
        onReady: function() {
            var overlayTb = new Ext.Toolbar({
                dock: 'top'
            });
            
            var overlay = new Ext.Panel({
                floating: true,
                modal: true,
                centered: false,
                width: Ext.platform.isPhone ? 260 : 400,
                height: Ext.platform.isPhone ? 220 : 400,
                styleHtmlContent: true,
                dockedItems: overlayTb,
                scroll: 'vertical',
                contentEl: 'lipsum',
                cls: 'htmlcontent'
            });
    
            var showOverlay = function(btn, event) {
                overlay.setCentered(false);
                overlayTb.setTitle('Attached Overlay');
                overlay.showBy(btn);
            };
            
            var showCenteredOverlay = function(btn, event) {
                overlay.setCentered(true);
                overlayTb.setTitle('Centered Overlay');
                overlay.show();
            };
    
            if (Ext.platform.isPhone) {
                var dockedItems = [{
                    dock: 'top',
                    xtype: 'toolbar',
                    items: [{
                        text: 'showBy',
                        handler: showOverlay                    
                    }]
                }, {
                    dock: 'bottom',
                    xtype: 'toolbar',
                    items: [{
                        text: 'show (centered)',
                        handler: showCenteredOverlay             
                    }, {xtype: 'spacer'}, {
                        text: 'showBy',
                        handler: showOverlay
                    }]
                }];
            }
            else {
                var dockedItems = [{
                    dock: 'top',
                    xtype: 'toolbar',
                    items: [{
                        text: 'showBy',
                        handler: showOverlay
                    }, {xtype: 'spacer'}, {
                        text: 'show (centered)',
                        handler: showCenteredOverlay
                    }, {xtype: 'spacer'}, {
                        text: 'showBy',
                        handler: showOverlay
                    }]
                }];
            }
            
            new Ext.Panel({
                fullscreen: true,
                dockedItems: dockedItems,
                html: "Test the overlay by using the buttons above."
            });
        }
    });

    Thank you so much for the help.
    -toe

Similar Threads

  1. How to make button launch phone #
    By jdogresorg in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 30 Aug 2010, 5:20 PM
  2. Can I make an ajax call to another server?
    By dlbjr in forum Ext 3.x: Help & Discussion
    Replies: 8
    Last Post: 31 Aug 2009, 10:57 AM
  3. How to make link and call a function
    By pearl_123 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 5 Mar 2009, 8:50 AM
  4. How to make a call to a spring bean??
    By VoDoK in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 29 Feb 2008, 4:58 AM

Thread Participants: 1

Tags for this Thread