FenceApi
Stay organized with collections
Save and categorize content based on your preferences.
This interface is deprecated.
Use getFenceClient(Activity)
instead.
Deprecated entry point for the Awareness Fence API using GoogleApiClient
.
The methods must be used in conjunction with a GoogleApiClient
instance. For example:
new GoogleApiClient.Builder(context)
.addApi(Awareness.API)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eFenceApi\u003c/code\u003e is deprecated and developers should use \u003ccode\u003eFenceClient\u003c/code\u003e via \u003ccode\u003eAwareness.getFenceClient(Activity)\u003c/code\u003e instead.\u003c/p\u003e\n"],["\u003cp\u003eIt provided an entry point for the Awareness Fence API using \u003ccode\u003eGoogleApiClient\u003c/code\u003e, which is now outdated.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003equeryFences\u003c/code\u003e and \u003ccode\u003eupdateFences\u003c/code\u003e methods, previously used with \u003ccode\u003eGoogleApiClient\u003c/code\u003e, have been replaced with their counterparts in \u003ccode\u003eFenceClient\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe Awareness API Guide offers further information and context for utilizing the updated Fence API functionalities.\u003c/p\u003e\n"]]],[],null,["# FenceApi\n\npublic interface **FenceApi** \n**This interface is deprecated.** \n\nUse [getFenceClient(Activity)](/android/reference/com/google/android/gms/awareness/Awareness#getFenceClient(android.app.Activity)) instead.\n\nDeprecated entry point for the Awareness Fence API using [GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient).\n\nThe methods must be used in conjunction with a [GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient)\ninstance. For example: \n\n\n new GoogleApiClient.Builder(context)\n .addApi(Awareness.API)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .build()\n \n##### See Also\n\n- [Awareness API Guide](//developers.google.com/awareness) \n\n### Public Method Summary\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[FenceQueryResult](/android/reference/com/google/android/gms/awareness/fence/FenceQueryResult)\\\u003e | [queryFences](/android/reference/com/google/android/gms/awareness/FenceApi#queryFences(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.awareness.fence.FenceQueryRequest))([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) client, [FenceQueryRequest](/android/reference/com/google/android/gms/awareness/fence/FenceQueryRequest) fenceQueryRequest) *This method is deprecated. Use [queryFences(FenceQueryRequest)](/android/reference/com/google/android/gms/awareness/FenceClient#queryFences(com.google.android.gms.awareness.fence.FenceQueryRequest)) instead.* |\n| abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[Status](/android/reference/com/google/android/gms/common/api/Status)\\\u003e | [updateFences](/android/reference/com/google/android/gms/awareness/FenceApi#updateFences(com.google.android.gms.common.api.GoogleApiClient, com.google.android.gms.awareness.fence.FenceUpdateRequest))([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) client, [FenceUpdateRequest](/android/reference/com/google/android/gms/awareness/fence/FenceUpdateRequest) fenceUpdateRequest) *This method is deprecated. Use [updateFences(FenceUpdateRequest)](/android/reference/com/google/android/gms/awareness/FenceClient#updateFences(com.google.android.gms.awareness.fence.FenceUpdateRequest)) instead.* |\n\nPublic Methods\n--------------\n\n#### public abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[FenceQueryResult](/android/reference/com/google/android/gms/awareness/fence/FenceQueryResult)\\\u003e\n**queryFences** ([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) client, [FenceQueryRequest](/android/reference/com/google/android/gms/awareness/fence/FenceQueryRequest) fenceQueryRequest)\n\n**This method is deprecated.** \n\nUse [queryFences(FenceQueryRequest)](/android/reference/com/google/android/gms/awareness/FenceClient#queryFences(com.google.android.gms.awareness.fence.FenceQueryRequest)) instead. \nQuery the state of a registered fence in the Awareness API. \n\n##### Parameters\n\n| client | A [GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) instance. |\n| fenceQueryRequest | A request encapsulating the query criteria parameters. |\n|-------------------|-----------------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- a [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult) with a [FenceQueryResult](/android/reference/com/google/android/gms/awareness/fence/FenceQueryResult). \n\n#### public abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[Status](/android/reference/com/google/android/gms/common/api/Status)\\\u003e\n**updateFences** ([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) client, [FenceUpdateRequest](/android/reference/com/google/android/gms/awareness/fence/FenceUpdateRequest) fenceUpdateRequest)\n\n**This method is deprecated.** \n\nUse [updateFences(FenceUpdateRequest)](/android/reference/com/google/android/gms/awareness/FenceClient#updateFences(com.google.android.gms.awareness.fence.FenceUpdateRequest)) instead. \nAdd or remove a set of fences that are registered with the Awareness API. \n\n##### Parameters\n\n| client | A [GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) instance. |\n| fenceUpdateRequest | A request indicating a batch of fences to add and/or remove. |\n|--------------------|-----------------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- a [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult) with [Status](/android/reference/com/google/android/gms/common/api/Status) indicating success or failure."]]