BatchedLocationCallback.java revision cf879db3666523404ff7e15e77b11434732b4a06
1/* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package android.location; 18 19import android.annotation.IntDef; 20import android.annotation.SystemApi; 21 22import java.lang.annotation.Retention; 23import java.lang.annotation.RetentionPolicy; 24import java.util.List; 25 26/** 27 * Used for receiving notifications from the LocationManager when 28 * the a batch of location is ready. These methods are called if the 29 * BatchedLocationCallback has been registered with the location manager service 30 * using the 31 * {@link LocationManager#registerGnssBatchedLocationCallback#startGnssBatch(long, 32 * boolean, BatchedLocationCallback, android.os.Handler)} method. 33 * @hide 34 */ 35@SystemApi 36public abstract class BatchedLocationCallback { 37 38 /** 39 * Called when a new batch of locations is ready 40 * 41 * @param locations A list of all new locations (possibly zero of them.) 42 */ 43 public void onLocationBatch(List<Location> locations) {} 44} 45