Datalogic .NET SDK

SetPhonePowerState (Method)

 

Syntax

 

   public static Boolean SetPhonePowerState(Boolean on);

 

 

Class                           : Device

Namespace                : Datalogic.API

Assembly                   : Datalogic.API.DLL

 

 

Description

Turn on or off the phone radio (GSM or HSDPA hardware).

 

 

Parameters Table

 

Type

Parameter

Description

[in]

Boolean

on

Set to TRUE to turn the phone on, FALSE to turn the phone off.

 

 

 

 

[returns]

Boolean

 

TRUE is returned on success, otherwise FALSE is returned.

[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