Mobile Phone Error

Last post 07-09-2009 12:54 AM by Bullonprowl. 5 replies.

Sort Posts:

  • Mobile Phone Error

    07-06-2009, 7:43 PM

    I am new at mobile phone apps..I am wrtiting an asp.net app for mobile phone devices. It is a simple app, but when I place a valid phone number in the phonecall object, everything works fine..UNTIL I click on the link to make the call. It tries to make the call and I get a screen with the following verbiage on it:

    "running a system command on this item might be unsafe. do you wish to continue?"

    It gives me the option to continue, I reply YES, but when it tries to complete the call, I get another message saying it tried to complete the call, but it appears invalid.

    The # is valid, but it cannot complete the call.

    Any ideas?

    Thanks in advance for the help.

    mark

  • Re: Mobile Phone Error

    07-07-2009, 8:07 AM
    Answer
    • Member
      332 point Member
    • Bullonprowl
    • Member since 08-16-2005, 6:04 AM
    • Chennai
    • Posts 87

    Hi Mark,

    Can you share the code? Try using this sample code

    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/Mobile/Page">
        
    <script language="vb" runat="Server">
        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    		PhoneCall1.Text = "Call Me"
    		PhoneCall1.PhoneNumber = "*123*66#"
    		Dim currentCapabilities As System.Web.Mobile.MobileCapabilities = CType(Request.Browser, System.Web.Mobile.MobileCapabilities)
    		If currentCapabilities.CanInitiateVoiceCall Then
    		PhoneCall1.AlternateFormat = "Call {0} at {1}"
    		'Else
    		'PhoneCall1.AlternateFormat = " Your Phone Doesnt Support Voice Initiate Property " --%>
    		End If
    		End Sub    
        </script>
    </head>
    <body Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm">  
        <mobile:Form id="Form1" runat="server">
        <mobile:PhoneCall runat="server" id="phonecall1" />
        </mobile:Form>
    </body>


     

    Regs,
    Bharani

    Please mark this post as "Answer" if it helped to solve your problem, so that others can also find it usefull while searching.
  • Re: Mobile Phone Error

    07-07-2009, 2:18 PM

     Bullonprowl,

    Thank you for your post...I think I am doing everything your post stated, but I am posting the code below:

    html source:

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="M_LeadFrm.aspx.vb" Inherits="Mobile_M_LeadFrm" %>

    <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>

    <html xmlns="http://www.w3.org/1999/xhtml" >body>

    <mobile:Form id="Form1" runat="server" BackColor="#C0C0FF">

    <mobile:Image ID="Image2" Runat="server" ImageUrl="~/Images/home_0.gif" NavigateUrl="~/mobile/M_Logo.aspx" BreakAfter="False">

    </mobile:Image>

    <mobile:Image ID="Image1" Runat="server" ImageUrl="~/Images/16_back.gif" NavigateUrl="~/mobile/M_Activities.aspx">

    </mobile:Image>

    <mobile:Label ID="Label1" Runat="server" Font-Bold="True" Font-Size="Small">

    </mobile:Label>

    <mobile:TextView ID="TextView1" Runat="server" Font-Size="Small" BreakAfter="False">

    </mobile:TextView>

    <mobile:Panel ID="Panel1" Runat="server">

    </mobile:Panel>

    <mobile:Link ID="Link1" Runat="server">Mapquest</mobile:Link>

    </mobile:Form></body></html>

    -----------------------------------------------

    code behind:

    --------------------------------------------

    labelX.Font.Bold = MobileControls.BooleanOption.True

    labelX.Font.Size = MobileControls.FontSize.Small

    labelX.Text = label4.Text

    phonecallX.Font.Size = MobileControls.FontSize.Small

    phonecallX.Font.Bold = MobileControls.BooleanOption.True

    Dim labelX As New MobileControls.LabelDim phonecallX As New MobileControls.PhoneCall

    If label4.Text <> "" Then

    phonecallX.PhoneNumber = PhoneCall1.PhoneNumber

    Panel1.Controls.Add(labelX)

    If phonecallX.PhoneNumber <> "0" Then

    Panel1.Controls.Add(phonecallX)

    End If

    End If

     

  • Re: Mobile Phone Error

    07-08-2009, 12:10 AM
    • Member
      332 point Member
    • Bullonprowl
    • Member since 08-16-2005, 6:04 AM
    • Chennai
    • Posts 87

    Hi Mark,

    you got my code working? as i have given.. you need to check, better, the capabilities of the browser if it supports CanInitiateVoiceCall.

    Regs,
    Bharani

    Please mark this post as "Answer" if it helped to solve your problem, so that others can also find it usefull while searching.
  • Re: Mobile Phone Error

    07-08-2009, 10:06 PM

    I think you have pointed me in the correct direction (browser). While I did not make any code changes, I did start messing with the browser. Finally today I got the phone to make the phone call from the browser without error. I still get that annoying message about it "potentially be unsafe to perform this operation. "

    Anyway, I apreciate the help...I will close this issue. If you have any idea on how I can get rid of that message screen, I would appreciate the info.

    mark

  • Re: Mobile Phone Error

    07-09-2009, 12:54 AM
    • Member
      332 point Member
    • Bullonprowl
    • Member since 08-16-2005, 6:04 AM
    • Chennai
    • Posts 87

    hi mark, happy that you got your problem solved :-). always happy to help. and you should have marked my reply with code as answer. you marked the other resposne as answer instead (code block may help others who is searching for the same problem).

    And regarding getting rid of the message, dont think its possible as it is phone dependant. message may vary depending on the phone and browser.

    Regs,
    Bharani

    Please mark this post as "Answer" if it helped to solve your problem, so that others can also find it usefull while searching.
Page 1 of 1 (6 items)
Microsoft Communities