A retry policy implementation that doubles the amount of time in between retries.
Retry policy used when the font provider is not ready to give the font file.
To control the thread the retries are handled on, see
setHandler(Handler).
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.RetryPolicy\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.RetryPolicy\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\nabstract\nclass\nFontRequestEmojiCompatConfig.RetryPolicy\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|---------------------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | android.support.text.emoji.FontRequestEmojiCompatConfig.RetryPolicy |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy) |----------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------| | [FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig.ExponentialBackoffRetryPolicy) | A retry policy implementation that doubles the amount of time in between retries. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nRetry policy used when the font provider is not ready to give the font file.\n\nTo control the thread the retries are handled on, see\n[setHandler(Handler)](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig#setHandler(android.os.Handler)).\n\nSummary\n-------\n\n| ### Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[FontRequestEmojiCompatConfig.RetryPolicy](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig.RetryPolicy#FontRequestEmojiCompatConfig.RetryPolicy())`() ` |\n\n| ### Public methods ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract long` | ` `[getRetryDelay](/reference/android/support/text/emoji/FontRequestEmojiCompatConfig.RetryPolicy#getRetryDelay())`() ` Called each time the metadata loading fails. |\n\n| ### Inherited methods |\n|-----------------------|---|\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.RetryPolicy\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nFontRequestEmojiCompatConfig.RetryPolicy ()\n```\n\n\u003cbr /\u003e\n\n\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)"]]