-
- All Implemented Interfaces:
-
android.content.SharedPreferences.OnSharedPreferenceChangeListener
public class CustomConsentManager implements SharedPreferences.OnSharedPreferenceChangeListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceCustomConsentManager.ConsentStatusListenerpublic interfaceCustomConsentManager.OnDismissListener
-
Field Summary
Fields Modifier and Type Field Description public final static StringCUSTOM_CONSENT_STRINGpublic final static StringTARGET_FRAGMENTpublic final static intPRIVACY_FRAGMENTpublic final static intCONSENT_FRAGMENTpublic final static intCONSENT_ACCEPTpublic final static intCONSENT_REJECTpublic final static intCONSENT_UNKNOWNprivate static volatile CustomConsentManagerinstanceprivate booleanisShowDialog
-
Method Summary
Modifier and Type Method Description static CustomConsentManagergetInstance(Context context)static CustomConsentManagergetInstance(Context context)booleanisShowDialog()voidonSharedPreferenceChanged(SharedPreferences sharedPreferences, String key)voidonDismiss()voidinitIsShowValue(boolean isShow)voidsetShowConsentDialog(boolean showConsentDialog)booleangetShowConsentDialog()voidaddStatusListener(CustomConsentManager.ConsentStatusListener listener)voidremoveStatusListener(CustomConsentManager.ConsentStatusListener listener)voidremoveAllListener()voidshowConsentDialog(Activity activity, CustomConsentManager.OnDismissListener onDismissListener)voidshowPrivacyDialog(Activity activity, CustomConsentManager.OnDismissListener onDismissListener)booleanisConsentReject()booleanisConsentAccept()booleanisConsentUnset()SharedPreferencesgetSharedPreferences()-
-
Method Detail
-
getInstance
static CustomConsentManager getInstance(Context context)
-
getInstance
static CustomConsentManager getInstance(Context context)
-
isShowDialog
boolean isShowDialog()
-
onSharedPreferenceChanged
void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key)
-
onDismiss
void onDismiss()
-
initIsShowValue
void initIsShowValue(boolean isShow)
-
setShowConsentDialog
void setShowConsentDialog(boolean showConsentDialog)
-
getShowConsentDialog
boolean getShowConsentDialog()
-
addStatusListener
void addStatusListener(CustomConsentManager.ConsentStatusListener listener)
-
removeStatusListener
void removeStatusListener(CustomConsentManager.ConsentStatusListener listener)
-
removeAllListener
void removeAllListener()
-
showConsentDialog
void showConsentDialog(Activity activity, CustomConsentManager.OnDismissListener onDismissListener)
-
showPrivacyDialog
void showPrivacyDialog(Activity activity, CustomConsentManager.OnDismissListener onDismissListener)
-
isConsentReject
boolean isConsentReject()
-
isConsentAccept
boolean isConsentAccept()
-
isConsentUnset
boolean isConsentUnset()
-
getSharedPreferences
SharedPreferences getSharedPreferences()
-
-
-
-