A retry policy implementation that doubles the amount of time in between retries.
If downloading hasn't finish within given amount of time, this policy give up and the
EmojiCompat will get into LOAD_STATE_FAILED state.
Called each time the metadata loading fails.
This is primarily due to a pending download of the font.
If a value larger than zero is returned, metadata loader will retry after the given
milliseconds.
If zero is returned, metadata loader will retry immediately.
If a value less than 0 is returned, the metadata loader will stop retrying and
EmojiCompat will get into LOAD_STATE_FAILED state.
Note that the retry may happen earlier than you specified if the font provider notifies
that the download is completed.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \nbelongs to Maven artifact com.android.support:support-emoji:28.0.0-alpha1 \nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \\| [\\[Expand All\\]](#) \n\nFontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy\n==========================================================\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\nstatic\n\n\nclass\nFontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy\n`\n\n\n`\n\n\n`\n\n`\n\nextends `[FontRequestEmojiCompatConfig.RetryPolicy](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig.RetryPolicy)`\n\n\n`\n\n`\n\n\n`\n\n|---|---|---------------------------------------------------------------------------------------|\n| java.lang.Object |||\n| ↳ | [android.support.text.emoji.FontRequestEmojiCompatConfig.RetryPolicy](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig.RetryPolicy) ||\n| | ↳ | android.support.text.emoji.FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA retry policy implementation that doubles the amount of time in between retries.\n\nIf downloading hasn't finish within given amount of time, this policy give up and the\nEmojiCompat will get into [LOAD_STATE_FAILED](/reference/android/support/text/emoji/EmojiCompat#LOAD_STATE_FAILED) state.\n\nSummary\n-------\n\n| ### Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy#FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy(long))`(long totalMs) ` |\n\n| ### Public methods ||\n|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` long` | ` `[getRetryDelay](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy#getRetryDelay())`() ` Called each time the metadata loading fails. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[android.support.text.emoji.FontRequestEmojiCompatConfig.RetryPolicy](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig.RetryPolicy)` ` |------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract long` | ` `[getRetryDelay](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig.RetryPolicy#getRetryDelay())`() ` Called each time the metadata loading fails. | ||\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nPublic constructors\n-------------------\n\n### FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nFontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy (long totalMs)\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|----------------------------------------------------------------|\n| `totalMs` | `long`: A total amount of time to wait in milliseconds. \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### getRetryDelay\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nlong getRetryDelay ()\n```\n\nCalled each time the metadata loading fails.\n\nThis is primarily due to a pending download of the font.\nIf a value larger than zero is returned, metadata loader will retry after the given\nmilliseconds.\n\n\nIf `zero` is returned, metadata loader will retry immediately.\n\n\nIf a value less than 0 is returned, the metadata loader will stop retrying and\nEmojiCompat will get into [LOAD_STATE_FAILED](/reference/android/support/text/emoji/EmojiCompat#LOAD_STATE_FAILED) state.\n\n\u003cbr /\u003e\n\nNote that the retry may happen earlier than you specified if the font provider notifies that the download is completed.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|---------------------------------------------------|\n| `long` | long milliseconds to wait until next retry \u003cbr /\u003e |\n\n-\n\n Interfaces\n ----------\n\n - [EmojiCompat.MetadataRepoLoader](/reference/android/support/text/emoji/EmojiCompat.MetadataRepoLoader)\n-\n\n Classes\n -------\n\n - [EmojiCompat](/reference/android/support/text/emoji/EmojiCompat)\n - [EmojiCompat.Config](/reference/android/support/text/emoji/EmojiCompat.Config)\n - [EmojiCompat.InitCallback](/reference/android/support/text/emoji/EmojiCompat.InitCallback)\n - [EmojiCompat.MetadataRepoLoaderCallback](/reference/android/support/text/emoji/EmojiCompat.MetadataRepoLoaderCallback)\n - [EmojiSpan](/reference/android/support/text/emoji/EmojiSpan)\n - [FontRequestEmojiCompatConfig](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig)\n - [FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy)\n - [FontRequestEmojiCompatConfig.RetryPolicy](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig.RetryPolicy)\n - [MetadataRepo](/reference/android/support/text/emoji/MetadataRepo)\n - [R](/reference/android/support/text/emoji/R)\n - [R.attr](/reference/android/support/text/emoji/R.attr)\n - [R.bool](/reference/android/support/text/emoji/R.bool)\n - [R.color](/reference/android/support/text/emoji/R.color)\n - [R.dimen](/reference/android/support/text/emoji/R.dimen)\n - [R.drawable](/reference/android/support/text/emoji/R.drawable)\n - [R.id](/reference/android/support/text/emoji/R.id)\n - [R.integer](/reference/android/support/text/emoji/R.integer)\n - [R.layout](/reference/android/support/text/emoji/R.layout)\n - [R.string](/reference/android/support/text/emoji/R.string)\n - [R.style](/reference/android/support/text/emoji/R.style)\n - [R.styleable](/reference/android/support/text/emoji/R.styleable)"]]