AwarenessFence
Stay organized with collections
Save and categorize content based on your preferences.
A combination of conditions on two or more types of context, which trigger a callback to
the app when satisfied.
Inherited Constant Summary
From interface android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
Inherited Method Summary
From class java.lang.Object
From interface android.os.Parcelable
abstract int |
describeContents
()
|
abstract void |
writeToParcel
( Parcel
arg0,
int arg1)
|
Public Methods
Create an awareness fence that is the logical AND of the specified fences.
Create an awareness fence that is the logical AND of fences in the specified fence
collection.
Parameters
fences
Collection of fences that should be combined with AND.
Returns
- The resulting combined awareness fence.
Create an awareness fence that is the logical NOT of the specified fence.
Parameters
fence
The fence that should be passed through a logical NOT.
Returns
- The resulting awareness fence.
Create an awareness fence that is the logical OR of the specified fences.
Create an awareness fence that is the logical OR of the specified fences.
Parameters
fences
Collection of fences that should be combined with OR.
Returns
- The resulting combined awareness fence.
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\u003eAwarenessFence\u003c/code\u003e combines conditions on different contexts to trigger callbacks when satisfied.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to create complex fences using logical operators like AND, OR, and NOT.\u003c/p\u003e\n"],["\u003cp\u003eThese methods accept individual fences or collections of fences to build combined conditions.\u003c/p\u003e\n"],["\u003cp\u003eThe resulting \u003ccode\u003eAwarenessFence\u003c/code\u003e triggers a callback to the app when all defined conditions are met.\u003c/p\u003e\n"]]],[],null,["# AwarenessFence\n\npublic abstract class **AwarenessFence** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nimplements [Parcelable](//developer.android.com/reference/android/os/Parcelable.html) \nA combination of conditions on two or more types of context, which trigger a callback to\nthe app when satisfied. \n\n### Inherited Constant Summary\n\nFrom interface android.os.Parcelable \n\n|-----|-------------------------------|---|\n| int | CONTENTS_FILE_DESCRIPTOR | |\n| int | PARCELABLE_WRITE_RETURN_VALUE | |\n\n### Public Method Summary\n\n|---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence) | [and](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence#and(com.google.android.gms.awareness.fence.AwarenessFence...))([AwarenessFence...](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence) fences) Create an awareness fence that is the logical AND of the specified fences. |\n| static [AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence) | [and](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence#and(java.util.Collection\u003ccom.google.android.gms.awareness.fence.AwarenessFence\u003e))([Collection](//developer.android.com/reference/java/util/Collection.html)\\\u003c[AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence)\\\u003e fences) Create an awareness fence that is the logical AND of fences in the specified fence collection. |\n| static [AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence) | [not](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence#not(com.google.android.gms.awareness.fence.AwarenessFence))([AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence) fence) Create an awareness fence that is the logical NOT of the specified fence. |\n| static [AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence) | [or](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence#or(com.google.android.gms.awareness.fence.AwarenessFence...))([AwarenessFence...](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence) fences) Create an awareness fence that is the logical OR of the specified fences. |\n| static [AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence) | [or](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence#or(java.util.Collection\u003ccom.google.android.gms.awareness.fence.AwarenessFence\u003e))([Collection](//developer.android.com/reference/java/util/Collection.html)\\\u003c[AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence)\\\u003e fences) Create an awareness fence that is the logical OR of the specified fences. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nFrom interface android.os.Parcelable \n\n|---------------|--------------------------------------------------------------------------------------------------|\n| abstract int | describeContents() |\n| abstract void | writeToParcel([Parcel](//developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |\n\nPublic Methods\n--------------\n\n#### public static [AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence)\n**and** ([AwarenessFence...](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence) fences)\n\nCreate an awareness fence that is the logical AND of the specified fences. \n\n#### public static [AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence)\n**and** ([Collection](//developer.android.com/reference/java/util/Collection.html)\\\u003c[AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence)\\\u003e fences)\n\nCreate an awareness fence that is the logical AND of fences in the specified fence\ncollection. \n\n##### Parameters\n\n| fences | Collection of fences that should be combined with AND. |\n|--------|--------------------------------------------------------|\n\n##### Returns\n\n- The resulting combined awareness fence. \n\n#### public static [AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence)\n**not** ([AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence) fence)\n\nCreate an awareness fence that is the logical NOT of the specified fence. \n\n##### Parameters\n\n| fence | The fence that should be passed through a logical NOT. |\n|-------|--------------------------------------------------------|\n\n##### Returns\n\n- The resulting awareness fence. \n\n#### public static [AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence)\n**or** ([AwarenessFence...](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence) fences)\n\nCreate an awareness fence that is the logical OR of the specified fences. \n\n#### public static [AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence)\n**or** ([Collection](//developer.android.com/reference/java/util/Collection.html)\\\u003c[AwarenessFence](/android/reference/com/google/android/gms/awareness/fence/AwarenessFence)\\\u003e fences)\n\nCreate an awareness fence that is the logical OR of the specified fences. \n\n##### Parameters\n\n| fences | Collection of fences that should be combined with OR. |\n|--------|-------------------------------------------------------|\n\n##### Returns\n\n- The resulting combined awareness fence."]]