11af4b0280af406cfc7eb46810f6b76e57b983e11destradaa/* 21af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * Copyright (C) 2013, The Android Open Source Project 31af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 41af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * Licensed under the Apache License, Version 2.0 (the "License"); 51af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * you may not use this file except in compliance with the License. 61af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * You may obtain a copy of the License at 71af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 81af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * http://www.apache.org/license/LICENSE-2.0 91af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 101af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * Unless required by applicable law or agreed to in writing, software 111af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * distributed under the License is distributed on an "AS IS" BASIS, 121af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 131af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * See the License for the specific language governing permissions and 141af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * limitations under the License. 151af4b0280af406cfc7eb46810f6b76e57b983e11destradaa */ 161af4b0280af406cfc7eb46810f6b76e57b983e11destradaa 171af4b0280af406cfc7eb46810f6b76e57b983e11destradaapackage android.location; 181af4b0280af406cfc7eb46810f6b76e57b983e11destradaa 190682809ad08db284d7110aab44108d5e9c310e6bdestradaaimport android.hardware.location.GeofenceHardwareRequestParcelable; 200682809ad08db284d7110aab44108d5e9c310e6bdestradaa 211af4b0280af406cfc7eb46810f6b76e57b983e11destradaa/** 221af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * Fused Geofence Hardware interface. 231af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 241af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * <p>This interface is the basic set of supported functionality by Fused Hardware modules that offer 251af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * Geofencing capabilities. 261af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 271af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * All operations are asynchronous and the status codes can be obtained via a set of callbacks. 281af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 291af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * @hide 301af4b0280af406cfc7eb46810f6b76e57b983e11destradaa */ 311af4b0280af406cfc7eb46810f6b76e57b983e11destradaainterface IFusedGeofenceHardware { 321af4b0280af406cfc7eb46810f6b76e57b983e11destradaa /** 331af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * Flags if the interface functionality is supported by the platform. 341af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 351af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * @return true if the functionality is supported, false otherwise. 361af4b0280af406cfc7eb46810f6b76e57b983e11destradaa */ 371af4b0280af406cfc7eb46810f6b76e57b983e11destradaa boolean isSupported(); 381af4b0280af406cfc7eb46810f6b76e57b983e11destradaa 391af4b0280af406cfc7eb46810f6b76e57b983e11destradaa /** 401af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * Adds a given list of geofences to the system. 411af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 420682809ad08db284d7110aab44108d5e9c310e6bdestradaa * @param geofenceRequestsArray The list of geofences to add. 431af4b0280af406cfc7eb46810f6b76e57b983e11destradaa */ 440682809ad08db284d7110aab44108d5e9c310e6bdestradaa void addGeofences(in GeofenceHardwareRequestParcelable[] geofenceRequestsArray); 451af4b0280af406cfc7eb46810f6b76e57b983e11destradaa 461af4b0280af406cfc7eb46810f6b76e57b983e11destradaa /** 471af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * Removes a give list of geofences from the system. 481af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 491af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * @param geofences The list of geofences to remove. 501af4b0280af406cfc7eb46810f6b76e57b983e11destradaa */ 511af4b0280af406cfc7eb46810f6b76e57b983e11destradaa void removeGeofences(in int[] geofenceIds); 521af4b0280af406cfc7eb46810f6b76e57b983e11destradaa 531af4b0280af406cfc7eb46810f6b76e57b983e11destradaa /** 541af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * Pauses monitoring a particular geofence. 551af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 561af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * @param geofenceId The geofence to pause monitoring. 571af4b0280af406cfc7eb46810f6b76e57b983e11destradaa */ 581af4b0280af406cfc7eb46810f6b76e57b983e11destradaa void pauseMonitoringGeofence(in int geofenceId); 591af4b0280af406cfc7eb46810f6b76e57b983e11destradaa 601af4b0280af406cfc7eb46810f6b76e57b983e11destradaa /** 611af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * Resumes monitoring a particular geofence. 621af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 631af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * @param geofenceid The geofence to resume monitoring. 641af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * @param transitionsToMonitor The transitions to monitor upon resume. 651af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 661af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * Remarks: keep naming of geofence request options consistent with the naming used in 671af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * GeofenceHardwareRequest 681af4b0280af406cfc7eb46810f6b76e57b983e11destradaa */ 691af4b0280af406cfc7eb46810f6b76e57b983e11destradaa void resumeMonitoringGeofence(in int geofenceId, in int monitorTransitions); 701af4b0280af406cfc7eb46810f6b76e57b983e11destradaa 711af4b0280af406cfc7eb46810f6b76e57b983e11destradaa /** 721af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * Modifies the request options if a geofence that is already known by the 731af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * system. 741af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 751af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * @param geofenceId The geofence to modify. 761af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * @param lastTransition The last known transition state of 771af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * the geofence. 781af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * @param monitorTransitions The set of transitions to monitor. 791af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * @param notificationResponsiveness The notification responsivness needed. 800682809ad08db284d7110aab44108d5e9c310e6bdestradaa * @param unknownTimer The time span associated with the. 810682809ad08db284d7110aab44108d5e9c310e6bdestradaa * @param sourcesToUse The source technologies to use. 821af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * 831af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * Remarks: keep the options as separate fields to be able to leverage the class 841af4b0280af406cfc7eb46810f6b76e57b983e11destradaa * GeofenceHardwareRequest without any changes 851af4b0280af406cfc7eb46810f6b76e57b983e11destradaa */ 861af4b0280af406cfc7eb46810f6b76e57b983e11destradaa void modifyGeofenceOptions( 871af4b0280af406cfc7eb46810f6b76e57b983e11destradaa in int geofenceId, 881af4b0280af406cfc7eb46810f6b76e57b983e11destradaa in int lastTransition, 891af4b0280af406cfc7eb46810f6b76e57b983e11destradaa in int monitorTransitions, 901af4b0280af406cfc7eb46810f6b76e57b983e11destradaa in int notificationResponsiveness, 910682809ad08db284d7110aab44108d5e9c310e6bdestradaa in int unknownTimer, 920682809ad08db284d7110aab44108d5e9c310e6bdestradaa in int sourcesToUse); 931af4b0280af406cfc7eb46810f6b76e57b983e11destradaa} 94