private void OnShowFail(IPromise <LocationResult> promise, ApplicationLocation location, string failMessage)
        {
            var result = new LocationResult {
                location = location,
                success  = false,
                message  = failMessage,
            };

            promise.Dispatch(result);
        }
        public LocationResult ParsePsdkAttributes(string location, bool success, long attributes)
        {
            var result = new LocationResult {
                location = ApplicationLocation.NameToEvent(location),
                success  = success
            };

            if ((attributes & LocationMgrAttributes.LOCATION_MGR_ATTR_NO_SOURCE) == 0)
            {
                result.sourceAssigned = false;
            }
            if ((attributes & LocationMgrAttributes.LOCATION_MGR_ATTR_SOURCE_EXIST) > 0)
            {
                result.sourceAssigned = true;
            }
            if ((attributes & LocationMgrAttributes.LOCATION_MGR_ATTR_PLAYING_MUSIC) > 0)
            {
                result.playsMusic = true;
            }

            return(result);
        }