Datalogic .NET SDK

GetPhonePowerStatus (Method)

 

Syntax

 

   public static Boolean GetPhonePowerStatus();

 

 

Class                           : Device

Namespace                : Datalogic.API

Assembly                   : Datalogic.API.DLL

 

 

Description

Get the status of the phone radio (GSM or HSDPA hardware).

 

 

Parameters Table

 

Type

Parameter

Description

[in]

void

-

-

 

 

 

 

[returns]

Boolean

 

TRUE indicates that the phone radio is on, FALSE indicates that the radio is off.

[on error]

FALSE

 

-

 

 

Example

      

       public bool PhoneState;

       // ...

 

        private void btnSetPhone_Click(object sender, EventArgs e)

        {

            bool b = false;

           

            PhoneState = Device.GetPhonePowerStatus();  // current state

 

            b = Device.SetPhonePowerState(!PhoneState); // change state

            if (!b)

            {

                txtPhoneStatus.Text = "No Phone avbl";

            }

        }

 

 

 

 

See Also

Example #031.

 

Copyright © Datalogic ADC. All Right Reserved