Lines Matching defs:provider

69      * Name of the network location provider.
70 * <p>This provider determines location based on
77 * Name of the GPS location provider.
79 * <p>This provider determines location using
80 * satellites. Depending on conditions, this provider may take a while to return
84 * <p> The extras Bundle for the GPS location provider can contain the
93 * A special location provider for receiving locations without actually initiating
96 * <p>This provider can be used to passively receive location updates
98 * the locations yourself. This provider will return locations generated by other
102 * not enabled this provider might only return coarse fixes.
107 * Name of the Fused location provider.
109 * <p>This provider combines inputs for all possible location sources
132 * when a provider enabled/disabled event is broadcast using a PendingIntent.
222 public void onStatusChanged(String provider, int status, Bundle extras) {
226 b.putString("provider", provider);
236 public void onProviderEnabled(String provider) {
239 msg.obj = provider;
244 public void onProviderDisabled(String provider) {
247 msg.obj = provider;
259 String provider = b.getString("provider");
262 mListener.onStatusChanged(provider, status, extras);
299 * @return list of Strings containing names of the provider
327 * Returns the information associated with the location provider of the
328 * given name, or null if no provider exists by that name.
330 * @param name the provider name
335 * given provider.
372 * Returns the name of the provider that best meets the given criteria. Only providers
375 * accuracy is returned. If no provider meets the criteria,
390 * @param enabledOnly if true then only a provider that is currently enabled is returned
391 * @return name of the provider that best matches the requirements
404 * Register for location updates using the named provider, and a
410 * @param provider the name of the provider with which to register
417 * @throws IllegalArgumentException if provider is null or doesn't exist
423 public void requestLocationUpdates(String provider, long minTime, float minDistance,
425 checkProvider(provider);
429 provider, minTime, minDistance, false);
434 * Register for location updates using the named provider, and a callback on
440 * @param provider the name of the provider with which to register
450 * @throws IllegalArgumentException if provider is null or doesn't exist
454 public void requestLocationUpdates(String provider, long minTime, float minDistance,
456 checkProvider(provider);
460 provider, minTime, minDistance, false);
474 * appropriate provider and parameters to compute the location
497 * Register for location updates using the named provider, and a
503 * @param provider the name of the provider with which to register
508 * @throws IllegalArgumentException if provider is null or doesn't exist
513 public void requestLocationUpdates(String provider, long minTime, float minDistance,
515 checkProvider(provider);
519 provider, minTime, minDistance, false);
528 * updated periodically by the named provider, or by the provider matching
553 * provider (such as {@link #NETWORK_PROVIDER} or {@link #GPS_PROVIDER}),
561 * location provider will only send your application an update when
571 * This provider does not actively turn on or modify active location
577 * location provider with extremely fast updates.
579 * <p>In case the provider is disabled by the user, updates will stop,
580 * and a provider availability update will be sent.
581 * As soon as the provider is enabled again,
582 * location updates will immediately resume and a provider availability
584 * with extra's specific to the provider. If a callback was supplied
600 * only a hint, and some location provider implementations ignored it.
607 * appropriate provider and parameters to compute the location
625 * Register for a single location update using the named provider and
631 * @param provider the name of the provider with which to register
639 * @throws IllegalArgumentException if provider is null or doesn't exist
643 public void requestSingleUpdate(String provider, LocationListener listener, Looper looper) {
644 checkProvider(provider);
648 provider, 0, 0, true);
660 * appropriate provider and parameters to compute the location
682 * Register for a single location update using a named provider and pending intent.
687 * @param provider the name of the provider with which to register
690 * @throws IllegalArgumentException if provider is null or doesn't exist
694 public void requestSingleUpdate(String provider, PendingIntent intent) {
695 checkProvider(provider);
699 provider, 0, 0, true);
710 * appropriate provider and parameters to compute the location
713 * @throws IllegalArgumentException if provider is null or doesn't exist
761 * because the system is performing provider fusion on the applications
1073 * Returns the current enabled/disabled status of the given provider.
1075 * <p>If the user has enabled this provider in the Settings menu, true
1078 * @param provider the name of the provider
1079 * @return true if the provider is enabled
1081 * @throws IllegalArgumentException if provider is null
1084 public boolean isProviderEnabled(String provider) {
1085 checkProvider(provider);
1088 return mService.isProviderEnabled(provider);
1122 * location fix obtained from the given provider.
1125 * without starting the provider. Note that this location could
1129 * <p> If the provider is currently disabled, null is returned.
1131 * @param provider the name of the provider
1132 * @return the last known location for the provider, or null
1135 * @throws IllegalArgumentException if provider is null or doesn't exist
1137 public Location getLastKnownLocation(String provider) {
1138 checkProvider(provider);
1141 provider, 0, 0, true);
1151 // --- Mock provider support ---
1156 * Creates a mock location provider and adds it to the set of active providers.
1158 * @param name the provider name
1161 * or the {@link android.provider.Settings.Secure#ALLOW_MOCK_LOCATION
1163 * @throws IllegalArgumentException if a provider with the given name already exists
1172 throw new IllegalArgumentException("provider name contains illegal character: " + name);
1183 * Removes the mock location provider with the given name.
1185 * @param provider the provider name
1188 * or the {@link android.provider.Settings.Secure#ALLOW_MOCK_LOCATION
1190 * @throws IllegalArgumentException if no provider with the given name exists
1192 public void removeTestProvider(String provider) {
1194 mService.removeTestProvider(provider);
1201 * Sets a mock location for the given provider.
1202 * <p>This location will be used in place of any actual location from the provider.
1207 * @param provider the provider name
1211 * or the {@link android.provider.Settings.Secure#ALLOW_MOCK_LOCATION
1213 * @throws IllegalArgumentException if no provider with the given name exists
1216 public void setTestProviderLocation(String provider, Location loc) {
1231 mService.setTestProviderLocation(provider, loc);
1238 * Removes any mock location associated with the given provider.
1240 * @param provider the provider name
1243 * or the {@link android.provider.Settings.Secure#ALLOW_MOCK_LOCATION
1245 * @throws IllegalArgumentException if no provider with the given name exists
1247 public void clearTestProviderLocation(String provider) {
1249 mService.clearTestProviderLocation(provider);
1256 * Sets a mock enabled value for the given provider. This value will be used in place
1257 * of any actual value from the provider.
1259 * @param provider the provider name
1263 * or the {@link android.provider.Settings.Secure#ALLOW_MOCK_LOCATION
1265 * @throws IllegalArgumentException if no provider with the given name exists
1267 public void setTestProviderEnabled(String provider, boolean enabled) {
1269 mService.setTestProviderEnabled(provider, enabled);
1276 * Removes any mock enabled value associated with the given provider.
1278 * @param provider the provider name
1281 * or the {@link android.provider.Settings.Secure#ALLOW_MOCK_LOCATION
1283 * @throws IllegalArgumentException if no provider with the given name exists
1285 public void clearTestProviderEnabled(String provider) {
1287 mService.clearTestProviderEnabled(provider);
1294 * Sets mock status values for the given provider. These values will be used in place
1295 * of any actual values from the provider.
1297 * @param provider the provider name
1303 * or the {@link android.provider.Settings.Secure#ALLOW_MOCK_LOCATION
1305 * @throws IllegalArgumentException if no provider with the given name exists
1307 public void setTestProviderStatus(String provider, int status, Bundle extras, long updateTime) {
1309 mService.setTestProviderStatus(provider, status, extras, updateTime);
1316 * Removes any mock status values associated with the given provider.
1318 * @param provider the provider name
1321 * or the {@link android.provider.Settings.Secure#ALLOW_MOCK_LOCATION
1323 * @throws IllegalArgumentException if no provider with the given name exists
1325 public void clearTestProviderStatus(String provider) {
1327 mService.clearTestProviderStatus(provider);
1558 * Sends additional commands to a location provider.
1559 * Can be used to support provider specific extensions to the Location Manager API
1561 * @param provider name of the location provider.
1562 * @param command name of the command to send to the provider.
1564 * The provider may optionally fill the extras Bundle with results from the command.
1568 public boolean sendExtraCommand(String provider, String command, Bundle extras) {
1570 return mService.sendExtraCommand(provider, command, extras);
1592 private static void checkProvider(String provider) {
1593 if (provider == null) {
1594 throw new IllegalArgumentException("invalid provider: " + provider);