1 // Copyright 2016 by Samsung Electronics, Inc.,
3 // This software is the confidential and proprietary information
4 // of Samsung Electronics, Inc. ("Confidential Information"). You
5 // shall not disclose such Confidential Information and shall use
6 // it only in accordance with the terms of the license agreement
7 // you entered into with Samsung.
11 namespace Tizen.Location
13 public static class LocatorHelper
16 /// Checks if the specified geographical positioning type is supported or not.
18 /// <param name="locationType"> The back-end positioning method to be used for LBS.</param>
19 /// <returns>Returns a boolean value indicating whether or not the specified method is supported.</returns>
20 public static bool IsSupportedType(LocationType locationType)
22 bool initStatus = Interop.LocatorHelper.IsSupported((int)locationType);
23 Log.Info(Globals.LogTag, "Checking if the Location Manager type is supported ," + initStatus);
28 /// Checks if the specified geographical positioning type is enabled or not.
30 /// <param name="locationType"> The back-end positioning method to be used for LBS.</param>
31 /// <returns>Returns a boolean value indicating whether or not the specified method is supported.</returns>
32 public static bool IsEnabledType(LocationType locationType)
34 Log.Info(Globals.LogTag, "Checking if the Location Manager type is Enabled");
36 int ret = Interop.LocatorHelper.IsEnabled((int)locationType, out initStatus);
37 if (((LocationError)ret != LocationError.None))
\r
39 Log.Error(Globals.LogTag, "Error Checking the Location Manager type is Enabled," + (LocationError)ret);
\r
40 LocationErrorFactory.ThrowLocationException(ret);
\r