當前位置: 首頁>>代碼示例>>Java>>正文


Java LocationRequest類代碼示例

本文整理匯總了Java中android.location.LocationRequest的典型用法代碼示例。如果您正苦於以下問題:Java LocationRequest類的具體用法?Java LocationRequest怎麽用?Java LocationRequest使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


LocationRequest類屬於android.location包,在下文中一共展示了LocationRequest類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: call

import android.location.LocationRequest; //導入依賴的package包/類
@Override
public Object call(final Object who, Method method, Object... args) throws Throwable {
    if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN) {
        LocationRequest request = (LocationRequest) args[0];
        fixLocationRequest(request);
    }
    if (isFakeLocationEnable()) {
        Object transport = ArrayUtils.getFirst(args, mirror.android.location.LocationManager.ListenerTransport.TYPE);
        if (transport != null) {
            Object locationManager = mirror.android.location.LocationManager.ListenerTransport.this$0.get(transport);
            MockLocationHelper.setGpsStatus(locationManager);
            GPSListenerThread.get().addListenerTransport(locationManager);
        }
        return 0;
    }
    return super.call(who, method, args);
}
 
開發者ID:coding-dream,項目名稱:TPlayer,代碼行數:18,代碼來源:MethodProxies.java

示例2: fixLocationRequest

import android.location.LocationRequest; //導入依賴的package包/類
private static void fixLocationRequest(LocationRequest request) {
    if (request != null) {
        if (LocationRequestL.mHideFromAppOps != null) {
            LocationRequestL.mHideFromAppOps.set(request, false);
        }
        if (LocationRequestL.mWorkSource != null) {
            LocationRequestL.mWorkSource.set(request, null);
        }
    }
}
 
開發者ID:coding-dream,項目名稱:TPlayer,代碼行數:11,代碼來源:MethodProxies.java

示例3: createFromParcel

import android.location.LocationRequest; //導入依賴的package包/類
@Override
public ProviderRequest createFromParcel(Parcel in) {
	ProviderRequest request = new ProviderRequest();
	request.reportLocation = in.readInt() == 1;
	request.interval = in.readLong();
	int count = in.readInt();
	for (int i = 0; i < count; i++) {
		request.locationRequests.add(LocationRequest.CREATOR.createFromParcel(in));
	}
	return request;
}
 
開發者ID:emdete,項目名稱:pyneo-wirelesslocation,代碼行數:12,代碼來源:ProviderRequest.java

示例4: writeToParcel

import android.location.LocationRequest; //導入依賴的package包/類
@Override
public void writeToParcel(Parcel parcel, int flags) {
	parcel.writeInt(reportLocation ? 1 : 0);
	parcel.writeLong(interval);
	parcel.writeInt(locationRequests.size());
	for (LocationRequest request : locationRequests) {
		request.writeToParcel(parcel, flags);
	}
}
 
開發者ID:emdete,項目名稱:pyneo-wirelesslocation,代碼行數:10,代碼來源:ProviderRequest.java

示例5: getLocationRequests

import android.location.LocationRequest; //導入依賴的package包/類
/**
 * Never null.
 */
public List<LocationRequestUnbundled> getLocationRequests() {
	List<LocationRequestUnbundled> result = new ArrayList<LocationRequestUnbundled>(
			mRequest.locationRequests.size());
	for (LocationRequest r : mRequest.locationRequests) {
		result.add(new LocationRequestUnbundled(r));
	}
	return result;
}
 
開發者ID:emdete,項目名稱:pyneo-wirelesslocation,代碼行數:12,代碼來源:ProviderRequestUnbundled.java

示例6: LocationRequestUnbundled

import android.location.LocationRequest; //導入依賴的package包/類
LocationRequestUnbundled(LocationRequest delegate) {
	this.delegate = delegate;
}
 
開發者ID:emdete,項目名稱:pyneo-wirelesslocation,代碼行數:4,代碼來源:LocationRequestUnbundled.java


注:本文中的android.location.LocationRequest類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。