Datalogic .NET SDK

SetGPSPowerState (Method)

 

Syntax

 

   public static Boolean SetGPSPowerState(Boolean on);

 

 

Class                           : Device

Namespace                : Datalogic.API

Assembly                   : Datalogic.API.DLL

 

 

Description

Turn the GPS on or off.

 

 

Parameters Table

 

Type

Parameter

Description

[in]

Boolean

on

Set to true to turn the GPS on, false to turn the GPS off.

 

 

 

 

[returns]

Boolean

 

TRUE is returned on success, otherwise FALSE is returned.

[on error]

FALSE

 

-

 

 

Example

 

         public bool GPSState;

         // ...

        private void btnSetGps_Click(object sender, EventArgs e)

        {

            bool b = false;

 

            GPSState = Device.GetGPSPowerStatus();  // current state

 

            b = Device.SetGPSPowerState(!GPSState); // change state

            if (!b)

            {

                txtGPSStatus.Text = "No GPS avbl";

            }

        }

 

 

 

 

See Also

Example #032.

 

Copyright © Datalogic ADC. All Right Reserved