当前位置: 首页>>代码示例>>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;未经允许,请勿转载。