internal static unsafe bool Invoke(ELocationAccuracy Accuracy) { long *p = stackalloc long[] { 0L, 0L }; byte *b = (byte *)p; *(b + 0) = (byte)Accuracy; Main.GetProcessEvent(LocationServices.DefaultObject, IsLocationAccuracyAvailable_ptr, new IntPtr(p));; return(*((bool *)(b + 1))); } }
internal static unsafe bool Invoke(ELocationAccuracy Accuracy, float UpdateFrequency, float MinDistanceFilter) { long *p = stackalloc long[] { 0L, 0L, 0L }; byte *b = (byte *)p; *(b + 0) = (byte)Accuracy; *((float *)(b + 4)) = UpdateFrequency; *((float *)(b + 8)) = MinDistanceFilter; Main.GetProcessEvent(LocationServices.DefaultObject, InitLocationServices_ptr, new IntPtr(p));; return(*((bool *)(b + 12))); } }
///<summary>Checks if the supplied Accuracy is available on the current device.</summary> ///<remarks> ///@param Accuracy - the accuracy to check ///@return - true if the mobile device can support the Accuracy, false if it will use a different accuracy ///</remarks> public static bool IsLocationAccuracyAvailable(ELocationAccuracy Accuracy) => LocationServices_methods.IsLocationAccuracyAvailable_method.Invoke(Accuracy);
///<summary> ///Called to set up the Location Service before use ///@ ///</summary> ///<remarks> ///param Accuracy - as seen in the enum above ///@param UpdateFrequency - in milliseconds. (Android only) ///@param MinDistance - minDistance before a location update, in meters. 0 here means "update asap" ///@return - true if Initialization was succesful ///</remarks> public static bool InitLocationServices(ELocationAccuracy Accuracy, float UpdateFrequency, float MinDistanceFilter) => LocationServices_methods.InitLocationServices_method.Invoke(Accuracy, UpdateFrequency, MinDistanceFilter);