It also updates the necessary emoji metadata that the EmojiCompat support library needs to keep up with the latest versions of the Unicode specification.
Platform
AndroidStudio
GooglePlay
Jetpack
Kotlin
Docs
Games
Language
English
BahasaIndonesia
Español–AméricaLatina
Português–Brasil
中文–简体
日本語
한국어
Signin
Documentation
Overview
Guides
Reference
Samples
Design&Quality
Platform
AndroidStudio
GooglePlay
Jetpack
Kotlin
Docs
Overview
Guides
Reference
Samples
Design&Quality
Games
AppBasics
Introduction
BuildyourfirstappOverviewCreateanAndroidprojectRunyourappBuildasimpleuserinterfaceStartanotheractivity
Appfundamentals
AppresourcesOverviewHandleconfigurationchanges
LocalizationLocalizeyourappTestyourappwithpseudolocalesUnicodeandinternationalizationsupportLanguageandlocaleresolutionComplexXMLresources
ResourcetypesOverviewAnimationColorstatelistDrawableLayoutMenuStringStyleFontMoretypes
AppmanifestfileOverview
Devices
DevicecompatibilityOverviewScreencompatibilityoverviewSupportdifferentpixeldensitiesSupportdisplaycutoutsDeclarerestrictedscreensupport
MultipleAPKsupportOverviewCreatemultipleAPKsfordifferentAPIlevelsCreatemultipleAPKsfordifferentscreensizesCreatemultipleAPKsfordifferentGLtexturesCreatemultipleAPKswithseveraldimensionsSupportdifferentlanguagesandculturesSupportdifferentplatformversionsFiltersonGooglePlay
Tablets,largescreens,andfoldablesGetstartedwithlargescreens
BuildresponsiveUIsSupportdifferentscreensizesNavigationforresponsiveUIsMigrateyourUItoresponsivelayoutsActivityembeddingMulti-windowsupportInputcompatibilityonlargescreens
BuildforfoldablesLearnaboutfoldablesMakeyourappfoldawareTestyourapponfoldables
WearGetstartedPrinciplesofWearOSdevelopmentUpgradetothelatestversionofWearOSWearOSversusmobiledevelopmentSetupJetpackComposeonWearOSUseJetpackComposeonWearOSWearOSdeveloperpathwayOngoingActivitiesWearOSuserinterfaceTilesExposedatatocomplications
GettingstartedCreateandrunawearableappDebugaWearOSappCaptureWearUIscreenshotsAppearinRecentsandAppResume
OverlaysOverviewUsetheWearUIlibraryHandledifferentwatchshapesScreenoptionsCreatelistsNavigationExitfullscreenactivitiesonWearShowconfirmationsPlayingaudioonwearablesWetmodeKeepyourappvisibleonWearAuthenticationStandaloneapp
NotificationsNotificationsonWearOSBridgingoptionsfornotifications
HandlingdataSendandsyncdataonWearOSNetworkaccessandsynconWearOSAccesstheWearableDataLayerTransferassetsSendandreceivemessagesHandledatalayereventsSyncdataitemswiththeDataLayerAPIRequestpermissionsDetectlocation
UserinputPhysicalbuttonsRotaryinputCreateinputmethodeditorsinWearVoice
WatchFaceStudioWatchFaceStudioKeyboardshortcutsManageaWatchFaceStudioprojectCreateawatchfacewithWatchFaceStudioBuildcomplicationsinWatchFaceStudioTagexpressionsLanguagesettingsAlways-oninWatchFaceStudioGyroeffectsBuildanduploadfromWatchFaceStudioTestyourwatchfaceFAQ
HealthservicesOverviewActivedataandexercisePassivedataupdatesUsesyntheticdataprovidersHealthPlatformAPI
DesignIntroductionDesignprinciplesGettingstartedInteractiontypesNotificationsComplicationsTilesOverlaysOngoingactivitiesConfirmationoverlayDisconnectionindicatorsPermissionmessagesSelectioncontrolsLaunchandlatencyNavigationPermissionsSigninHardwarebuttonsColorTypographyIconsDownloads
ComponentsWearMaterialThemingButtonsChipsTogglechipsCardsListsCurvedtextsSwipetodismissScrollindicatorsPickersPageviewersSlidersProgressindicator
CreatingwatchfacesOverviewDesignwatchfacesBuildawatchfaceserviceDrawwatchfacesWatchfacecomplicationsAddingcomplicationstoawatchfaceCreatinginteractivewatchfacesProvideconfigurationactivitiesAddresscommonissuesImproveperformacewithhardwareaccelerationOptimizeperformanceandbatterylifeWearappqualityPackageWearOSappsDistributetoWearOSCreateWearOSappsforChinaWearOSreleasenotes
AndroidTVOverview
BuildTVAppsOverviewGetstartedwithTVappsAndroidXTVlibrariesHandleTVhardwareManageTVcontrollersBuildTVlayoutsOn-screenkeyboardCreateTVnavigationBestpracticesfordrivingengagementonGoogleTV
BuildTVplaybackappsOverviewCreateacatalogbrowserProvideacardviewBuildadetailsviewUseLeanbacktransportcontrolsPlaybackcontrolsonTVDisplayaNowPlayingcardAddaguidedstepIntroducefirst-timeuserstoyourappEnablebackgroundplaybackAudiocapabilitiesManageframerates
HelpusersfindcontentonTVOverview
RecommendTVcontentOverviewChannelsonthehomescreenVideoprogramattributesAudioprogramattributesGameprogramattributes
WatchNextAddprogramsAttributesGuidelinesforappdevelopersGuidelinesforTVprovidersPreviewvideosRecommendationsinAndroidNandearlierMakeTVappssearchableSearchwithinTVApps
BuildTVgamesOverviewUseStreamProtectforlatency-sensitivestreamingapps
BuildTVinputservicesOverviewDevelopaTVinputserviceWorkwithchanneldataManageTVuserinteractionSupporttime-shiftingSupportcontentrecordingTVAppschecklist
TVAccessibilityAccessibilitybestpracticesTalkBackevaluationexamplesAdoptsystemcaptionsettingsCustomviewaccessibilitysupportCustomviewaccessibilitysampleAndroid12DeveloperPreviewforTV
AndroidforCarsOverview
BuildmediaappsforcarsBuildmediaappsforcarsAddsupportforAndroidAutoAddsupportforAndroidAutomotiveOSBuildmessagingappsforAndroidAuto
Buildnavigation,parking,andchargingappsforcarsUsingtheAndroidforCarsAppLibraryBuildparkingandchargingappsforcarsBuildnavigationappsforcarsAddsupportforAndroidAutoTestAndroidappsforcarsGooglePlayservicesNotificationsonAndroidAutomotiveOS
AndroidThingsOverviewPlatformdifferencesGoogleservices
SupportedhardwareOverviewNXPi.MX7DRaspberryPi3
AdvancedsetupOverviewManuallyflashanimageRecoveradeviceConnectingtoWi-Fiwithadb
Buildapps
CreateaThingsappOverviewCreateaprojectConnectthehardwareInteractwithperipheralsIntegrateperipheraldrivers
CommunicatewithwirelessdevicesBluetoothLoWPAN
ConfiguredevicesSettingsUpdates
InteractwithperipheralsOverviewGPIOPWMI2CSPIUARTNativePIOCLItoolIntegratenativecode
Builduser-spacedriversOverviewLocationInputSensorsLoWPANSamples
ManagedevicesOverviewCreateaproductConfigureaproduct
CreateabuildOverviewManageapps
PushanupdateOverviewAutomaticupdatesMonitoranalytics
TermsConsoleTermsofServiceSDKLicenseAgreementAndroidThingsConsole
ChromeOSdevicesOverviewBuildingappsforChromeOSOptimizingAppsforChromeOSPreparingyourdevelopmentenvironmentAppManifestCompatibilityforChromebooksChromeOSDeviceSupportforAppsAppRenderingDifferencesonChromebooksWindowmanagementAdaptingGamesonChromeOSSmoothanimationonChromeOSTestCasesforAndroidAppsonChromeOS
Apparchitecture
Introduction
Guidetoapparchitecture
ArchitectureComponents
UIlayerlibraries
ViewbindingOverviewMigratefromKotlinsyntheticstoviewbinding
DatabindinglibraryOverviewGetstartedLayoutsandbindingexpressionsWorkwithobservabledataobjectsGeneratedbindingclassesBindingadaptersBindlayoutviewstoArchitectureComponentsTwo-waydatabinding
Lifecycle-awarecomponentsHandlelifecyclesViewModelLiveDataSaveUIstatesSavedStatemoduleforViewModelUseKotlincoroutineswithlifecycle-awarecomponents
PagingLibraryOverviewLoadanddisplaypageddataPagefromnetworkanddatabaseTransformdatastreamsManageandpresentloadingstatesTestyourPagingimplementationMigratetoPaging3
Paging2OverviewDisplaypagedlistsLoadpageddata
DatalayerlibrariesDataStore
WorkManagerOverviewGettingStarted
How-ToGuidesDefiningyourWorkRequestsWorkstatesManagingworkObservingintermediateWorkerprogressChainingworktogetherTestingWorkerimplementationIntegrationtestswithWorkManagerDebuggingWorkManager
AdvancedConceptsConfigurationandInitialization
ThreadinginWorkManagerOverviewThreadinginWorkerThreadinginCoroutineWorkerThreadinginRxWorkerThreadinginListenableWorkerSupportforlong-runningworkersMigratingfromFirebaseJobDispatcherMigratingfromGCMNetworkManager
Appentrypoints
ActivitiesIntroductiontoactivitiesTheactivitylifecycleActivitystatechangesTestyouractivitiesTasksandbackstackProcessesandapplifecycleParcelablesandbundlesLoadersRecentsscreenRestrictionsonstartingactivitiesfromthebackground
AppshortcutsOverviewCreateshortcutsAddcapabilitiesManageshortcutsBestpracticesforshortcuts
AppnavigationPrinciplesofnavigationDesignfordifferentformfactorsHandleconfigurationchanges
NavigationcomponentOverviewGettingstartedCreatedestinationsDesignnavigationgraphsNestedgraphsGlobalactionsNavigatetoadestinationConditionalnavigationPassdatabetweendestinationsCreateadeeplinkforadestinationAnimatetransitionsbetweendestinationsUpdateUIcomponentswithNavigationUIKotlinDSLInteractprogrammaticallyNavigatewithfeaturemodulesBestpracticesformulti-moduleprojectsTestnavigationAddnewdestinationtypesMigratetotheNavigationcomponent
FragmentsOverviewCreateafragmentFragmentmanagerFragmenttransactionsAnimatetransitionsbetweenfragmentsFragmentlifecycleSavingstatewithfragmentsCommunicatewithfragmentsWorkingwiththeappbarDisplayingdialogswithDialogFragmentDebugyourfragmentsTestyourfragments
ApplinksOverviewEnablinglinkstoappcontentVerifyapplinksCreateapplinksforinstantappsCreateswipeviewswithtabsusingViewPagerCreateswipeviewswithtabsusingViewPager2Providecustombacknavigation
DependencyinjectionOverviewManualdependencyinjectionDependencyinjectionwithHiltHiltinmulti-moduleappsHiltandJetpackintegrationsHilttestingguideHiltandDaggerannotationscheatsheet
DaggerDaggerbasicsUsingDaggerinAndroidappsUsingDaggerinmulti-moduleapps
AppStartup
Coretopics
AppcompatibilityOverviewCompatibilityframeworktoolsRestrictionsonnon-SDKinterfaces
InteractwithotherappsOverviewSendingtheusertoanotherappGettingaresultfromanactivityAllowingotherappstostartyouractivity
PackagevisibilityOverviewKnowwhichpackagesarevisibleautomaticallyDeclarepackagevisibilityneedsFulfillcommonusecasesTestpackagevisibility
IntentsandintentfiltersOverviewCommonintents
UserinterfaceOverview
LayoutsOverviewBuildaresponsiveUIwithConstraintLayout
AddmotiontoyourlayoutwithMotionLayoutOverviewCarouselwithMotionLayoutMotionLayoutexamples
MotionLayoutXMLreferenceOverviewCreatealistwithRecyclerViewAdvancedRecyclerViewcustomizationCreateacard-basedlayoutCreateatwopanelayout
ImprovinglayoutperformanceOverviewOptimizinglayouthierarchiesRe-usinglayoutswithDelayedloadingofviewsLinearlayoutAdapterviewRelativelayout
CustomviewcomponentsOverviewCreatingacustomviewclassImplementingcustomdrawingMakingtheviewinteractiveOptimizingtheviewDesigningforfoldables
LookandfeelMaterialdesignStylesandthemesDarkthemeRoundedcornersAdaptiveiconsAddafloatingactionbuttonCreateshadowsandclipviews
TextAutosizingTextViewsDownloadablefontsFontsinXML
EmojiSupportmodernemojiEmojicompatibilityMagnifierwidgetSpansButtonsCheckboxesRadiobuttonsTogglebuttonsSpinnersPickersTooltips
NotificationsOverviewCreateanotificationCreateanexpandablenotificationDisplaytime-sensitivenotificationsStartanactivityfromanotificationCreateagroupofnotificationsCreateandmanagenotificationchannelsModifyanotificationBadgeCreateacustomnotification
SplashscreensOverviewMigrateyourexistingsplashscreenConversationsBubbles
AddtheappbarOverviewSetuptheappbarAddandhandleactionsAddanupactionUseactionviewsandactionproviders
ControlthesystemUIvisibilityOverviewDimthesystembarsHidethestatusbarHidethenavigationbarEnablefullscreenmodeRespondtoUIvisibilitychanges
Supportingswipe-to-refreshOverviewAddingswipe-to-refreshtoyourappRespondingtoarefreshgestureToastsoverview
Pop-upmessagesoverviewOverviewBuildanddisplayapop-upmessageAddanactiontoamessageDialogsMenus
SettingsOverviewOrganizeyoursettingsCustomizeyoursettingsUsesavedvaluesBuildahierarchyincodeHandleotherformfactorsPreferencecomponentsandattributes
SearchOverviewCreatingasearchinterfaceAddingrecentquerysuggestionsAddingcustomsuggestionsSearchableconfiguration
AddingsearchfunctionalityOverviewSettingupthesearchinterfaceStoringandsearchingfordataRemainingbackwardcompatibleCopyandpasteDraganddropPicture-in-picturesupport
Creatingbackward-compatibleUIsOverviewAbstractingthenewAPIsProxyingtothenewAPIsCreatinganimplementationwitholderAPIsUsingtheversion-awarecomponentDevicecontrol
HomechannelsformobileappsOverviewMediaHomeBooksMediaHomeVideo
AppwidgetsOverviewCreateasimplewidgetEnhanceyourwidgetCreateanadvancedwidgetUsewidgetcollectionsProvideflexiblewidgetlayoutsEnablewidgetconfigurationBuildanappwidgethost
Animations&transitionsOverviewIntroductiontoanimationsPropertyanimationoverviewAnimatedrawablegraphicsRevealorhideaviewusinganimationMoveaviewusinganimationMoveaviewusingaflinganimationEnlargeaviewusingazoomanimationAnimatemovementusingspringphysicsAutoanimatelayoutupdatesAnimatelayoutchangesusingatransitionCreateacustomtransitionanimationStartanactivityusingananimationSlidebetweenfragmentsusingViewPagerSlidebetweenfragmentsusingViewPager2MigratefromViewPagertoViewPager2Additionalresources
Images&graphicsOverviewDrawablesoverviewVectordrawablesoverviewHandlingbitmapsSelectingcolorswiththepaletteAPIReducingimagedownloadsizesHardwareaccelerationOpenGLES
DisplayinggraphicswithOpenGLESOverviewBuildinganOpenGLESenvironmentDefiningshapesDrawingshapesApplyingprojectionandcameraviewsAddingmotionRespondingtotouchevents
RenderingOverviewReducingoverdrawPerformanceandviewhierarchiesAnalyzingwithprofileGPUrenderingEnhancinggraphicswithwidecolorcontent
Audio&videoAudio&videooverviewMediacontrolsSupportedmediaformatsMediacodecs
MediaapparchitectureMediaapparchitectureoverviewUsingamediasession
BuildinganaudioappAudioappoverviewBuildingamediabrowserserviceBuildingamediabrowserclientMediasessioncallbacksUsingthemediacontrollertestapp
BuildingavideoappVideoappoverviewBuildingavideoplayeractivityMediasessioncallbacksCompatiblemediatranscodingRespondingtomediabuttonsHandlingchangesinaudiooutputManageaudiofocus
TheGoogleAssistantTheGoogleAssistantandmediaappsMediaappsonGoogleAssistantdrivingmode
RoutingbetweendevicesRoutingoverviewMediaRouteroverviewMediaRouteProvideroverviewControlamplitudewithVolumeShaperMediaPlayeroverviewMediaRecorderoverviewExoPlayerSharingaudioinputCapturevideoandaudioplaybackFramerateBestpracticesforsharingvideoAdditionalResourcesforMedia
ServicesOverviewForegroundservicesBoundservicesAIDLoverview
BackgroundtasksOverviewBackgroundthreadsBackgroundoptimizations
BroadcastsOverviewImplicitBroadcastExceptions
ManagedeviceawakestateOverviewKeepthedeviceawakeSchedulealarms
PermissionsOverviewEvaluatewhetheryourappneedspermissionsDeclareapppermissionsRequestapppermissionsExplainaccesstomoresensitiveinformationApppermissionsbestpracticesPermissionsusedonlyindefaulthandlersRestrictinteractionswithotherappsDefinecustompermissions
Appdata&filesOverviewStorageoverviewSavetoapp-specificstorage
SavetosharedstorageOverviewMediaDocumentsandotherfilesDatasetsManageallfilesonastoragedeviceSavekey-valuedata
SavedatainalocaldatabaseOverviewDefinedatausingentitiesAccessdatausingDAOsDefinerelationshipsbetweenobjectsWriteasynchronousDAOqueriesCreateviewsintoadatabasePrepopulateyourdatabaseMigrateyourdatabaseTestanddebugyourdatabaseReferencecomplexdataMigratefromSQLitetoRoomSavedatausingSQLiteStorageusecasesandbestpractices
SharingsimpledataOverviewSendingsimpledatatootherappsReceivingsimpledatafromotherapps
SharingfilesOverviewSettingupfilesharingSharingafileRequestingasharedfileRetrievingfileinformation
SharingfileswithNFCOverviewSendingfilestoanotherdeviceReceivingfilesfromanotherdevice
PrintingfilesOverviewPrintingphotosPrintingHTMLdocumentsPrintingcustomdocuments
ContentprovidersOverviewContentproviderbasicsCreatingacontentproviderOpenfilesusingstorageaccessframeworkCreateacustomdocumentproviderAppinstalllocation
Userdata&identityOverviewAddsign-inworkflowShowabiometricauthenticationdialog
AutofillframeworkOverviewOptimizeyourappforautofillBuildautofillservicesIntegrateautofillwithkeyboardsIdentifydeveloper-ownedappsReviewhowyourappcollectsandsharesuserdataAuditdataaccessGetauser-resettableadvertisingIDCalendarprovideroverview
ContactsproviderOverviewRetrievingalistofcontactsRetrievingdetailsforacontactModifyingcontactsusingintentsDisplayingthequickcontactbadgeAccounttransfer
DatabackupOverviewBackupuserdataBackupkey-valuepairsTestbackupandrestoreBestpracticesforuniqueidentifiers
RememberandauthenticateusersOverviewRememberyouruserAuthenticatetoOAuth2servicesCreateacustomaccounttype
UserlocationOverviewRequestlocationpermissionsGetthelastknownlocationChangelocationsettingsRequestlocationupdatesAccesslocationinthebackgroundCreateandmonitorgeofencesDetectwhenusersstartanactivityOptimizelocationforbatteryTestlocationworkflowsMigratetolocationandcontextAPIsAddmaps
Touch&inputOverviewInputevents
UsingtouchgesturesOverviewDetectcommongesturesTracktouchandpointermovementsAnimateascrollgestureSupportnavigationgesturesImplementedge-to-edgeHandlemulti-touchgesturesDragandscaleManagetoucheventsinaViewGroup
HandlingkeyboardinputOverviewSpecifyingtheinputmethodtypeHandlinginputmethodvisibilitySupportingkeyboardnavigationHandlingkeyboardactions
SupportinggamecontrollersOverviewHandlingcontrolleractionsSupportingcontrollersacrossAndroidversionsSupportingmultiplegamecontrollers
InputmethodeditorsCreatinganinputmethodImagekeyboardReceiverichcontentSpellingchecker
CameraXOverviewCameraXarchitectureConfigurationPreviewImageanalysisImagecaptureVideocaptureExtensionsAPITransformoutputUsecaserotationsCameraXdevices
Camera2OverviewCameracapturesessionsandrequestsCameraenumerationUsemultiplecamerastreamssimultaneouslyCamerapreviewonlargescreensMulti-CameraAPIExtensionsAPI
CameraOverviewTakingphotosRecordingvideosControllingthecameraCameraAPI
SensorsOverviewSensorsoverviewMotionsensorsPositionsensorsEnvironmentsensorsRawGNSSmeasurements
ConnectivityOverview
PerformingnetworkoperationsOverviewConnecttothenetworkManagenetworkusageReadingnetworkstateOptimizenetworkdatausageParseXMLdata
TransmitnetworkdatausingVolleyOverviewSendasimplerequestSetupRequestQueueMakeastandardrequestImplementacustomrequest
PerformnetworkoperationsusingCronetOverviewSendasimplerequestCronetrequestlifecycle
Reference
org.chromium.netOverviewCallbackException
CronetEngineOverview
CronetEngine.BuilderOverviewLibraryLoaderCronetExceptionInlineExecutionProhibitedExceptionNetworkExceptionQuicExceptionUploadDataProviderUploadDataProvidersUploadDataSink
UrlRequestOverviewBuilderCallbackStatusStatusListener
UrlResponseInfoOverviewHeaderBlockEnhanceyourappswith5GBuildclient-serverapplicationswithgRPC
TransferringdatawithoutdrainingthebatteryOverviewOptimizedownloadsforefficientnetworkaccessMinimizetheeffectofregularupdatesAvoidredundantdownloadsModifypatternsbasedontheconnectivitytype
ReducenetworkbatterydrainOverviewCollectingnetworktrafficdataAnalyzingdatatrafficOptimizeuser-initiatednetworkuseOptimizeapp-initiatednetworkuseOptimizeserver-initiatednetworkuseOptimizinggeneralnetworkuse
TransferdatausingSyncAdaptersOverviewCreateaStubAuthenticatorCreateaStubContentProviderCreateaSyncAdapterRunaSyncAdapter
BluetoothOverviewSetupBluetoothFindBluetoothdevicesConnectBluetoothdevicesTransferBluetoothdataBluetoothpermissionsBluetoothprofilesCompaniondevicepairing
BluetoothLowEnergyOverviewFindBLEdevicesConnecttoaGATTserverTransferBLEdata
NFCOverviewNFCbasicsAdvancedNFCHost-basedcardemulationoverview
TelecomOverviewBuildacallingappPreventcallerIDspoofingTelephonyIDs
Wi-FiWi-FiscanningoverviewWi-Fipeer-to-peerWi-FiAwareoverviewWi-FilocationwithRTTLocalOnlyHotspot
Wi-FiinfrastructureWi-FiinfrastructureoverviewWi-FisuggestionAPIforinternetconnectivityWi-FiNetworkRequestAPIforpeer-to-peerconnectivityPasspointSavenetworksandPasspointconfigurations
USBOverviewAccessoryoverviewHostoverviewVPNSessioninitiationprotocoloverview
DiscoverandconnectOverviewUsenetworkservicediscoveryCreateP2PconnectionswithWi-FiUseWi-FiP2PforservicediscoveryWi-FiEasyConnectOpenMobileAPIreadersupport
RenderscriptOverviewAdvancedRenderScriptMigratefromRenderScript
RuntimeAPIreferenceOverviewNumericaltypesObjecttypesConversionfunctionsMathematicalconstantsandfunctionsVectormathfunctionsMatrixfunctionsQuaternionfunctionsAtomicupdatefunctionsTimefunctionsandtypesAllocationdataaccessfunctionsObjectcharacteristicsfunctionsKernelinvocationfunctionsandtypesInput/outputfunctionsDebuggingfunctionsGraphicsfunctionsandtypesIndex
Web-basedcontentOverviewBuildingwebappsinWebViewManagingWebViewobjectsLoadlocalcontentDarkenwebcontentUserprivacyinWebViewcrashreportingMigratingtoWebViewinAndroid4.4SupportingdifferentscreensinwebappsDebuggingwebappsBestpracticesforwebapps
AndroidAppBundlesOverviewConfigurethebasemoduleBuildandtestyourappbundleAddcodetransparencyTheappbundleformatFrequentlyaskedquestions
GooglePlayGooglePlayBillingPlayCoreLibrary
PlayAssetDeliveryOverviewIntegrateassetdelivery(Kotlin&Java)Integrateassetdelivery(native)Integrateassetdelivery(Unity)TargettexturecompressionformatsTestassetdelivery
PlayFeatureDeliveryOverviewConfigureinstall-timedeliveryConfigureconditionaldeliveryConfigureon-demanddeliveryOn-demanddeliverybestpracticesConfigureinstantdeliveryAdditionalresources
In-appreviewsOverviewIntegrateusingKotlinorJavaIntegrateusingnativecodeIntegrateusingUnityTestin-appreviews
In-appupdatesOverviewSupportin-appupdates(KotlinorJava)Supportin-appupdates(Native)Supportin-appupdates(Unity)Testin-appupdates
GooglePlayInstantOverviewofGooglePlayInstant
GetstartedwithinstantappsCreateaninstant-enabledappbundleUXbestpracticesforapps
GetstartedwithinstantgamesOverviewUnitypluginUXbestpracticesforgamesMigratetoAndroidAppBundlesImplementclouddeliveryofassetsSupportGooglePlayGamesServicesInstantPlaygamesInstantPlaygameschecklistReducethesizeofyourinstantapporgameAddadstoyourinstantapporgameProvidemultipleentrypoints
IntegratewithFirebaseAddGoogleAnalyticsforFirebasetoyourinstantappUseFirebaseDynamicLinkswithinstantappsTechnicalrequirementschecklistGooglePlayInstantpolicy
ResourcesReferenceCodesamplesSDKreleasenotesInstantAppIntents
SupportKnownissuesStackOverflowPlayDeveloperAPI
PlayInstallReferrerOverview
PlayInstallReferrerLibraryOverviewReferenceReleasenotesPlayInstallReferrerAPIPlayIntegrityAPI
ApplicationLicensingOverviewLicensingOverviewSettingUpforLicensingAddingServer-SideVerificationAddingClient-SideVerificationLicensingReferenceAPKExpansionFiles
AppActions
SlicesOverviewGettingStartedSlicetemplates
On-devicesearch
Games
ToolsAndroidStudio
AndroidGameDevelopmentExtensionforVisualStudioOverviewQuickstartConfigureaprojectDebuggerMeasureappperformanceSamplesReleasenotesAndroidNDK
AndroidGPUInspectorOverviewQuickstart
SystemprofilingOverviewViewasystemprofile
AnalyzeasystemprofileFrameprocessingtimesMemoryefficiencyTexturememorybandwidthusageVertexmemorybandwidthusageThreadscheduling
GPUperformancecountersArmMaliQualcommAdrenoImaginationPowerVR
FrameprofilingOverview
AnalyzeaframeprofileMostexpensiverenderpassesVertexformatsShaderperformance
FrameProfilerUIPerformancepaneCommandspaneFramebufferpaneGeometrypaneReportpaneShaderpaneMemorypaneStatepaneTexturespaneTexturepanePipelineviewpaneSupportedVulkanextensionsTroubleshoot
CustomizeorportgameenginesOverview
GettingstartedIntegrateGameActivityConfiguregraphicsUnderstandAndroidgameloops
ProcessinputeventsAddtouchsupportSupporttextinput
SupportgamecontrollersOverviewUsethegamecontrollerlibraryUsecustomcontrollerdevicemappingsAddmousesupportSupportsensorinput
AchieveproperframepacingOverview
FramepacinginOpenGLESIntegrateUpdateyourbuildsettingsAddframepacingfunctionsVerifyframepacingimprovement
FramepacinginVulkanIntegrateUpdateyourbuildsettingsAddframepacingfunctionsVerifyframepacingimprovementReference
IntegrateAndroidPerformanceTunerOverviewRunthedemoappEnabletheAPIUpdateyourbuildsettingsDefineannotations,fidelityparameters,andsettingsAddframetimingfunctionsAddloadingtimerecordingfunctionsValidate,package,andpublishtheAPKTroubleshootcommonerrorsAdvancedusageReference
OutputaudioOverviewUpdatebuildsettingsUseOboeCodesamplesFullOboeguide
ManagememoryOverviewDebugnativememoryuseDeliverassetsDetectanddiagnosecrashes
UseprebuiltorturnkeygameenginesOverview
DevelopwithDefoldInstallandconfigureprojectsforAndroidSupportmultipleformfactorsandscreensizesExporttoAndroid
DevelopwithGodotInstallandconfigureprojectsforAndroidGodotrendereroptionsSupportmultipleformfactorsandscreensizesExporttoAndroid
DevelopwithUnityOverviewCreateanAndroidAppBundlewithUnityIntegratePlayAssetDeliveryUnityLightinginMobileGames
UseAndroidPerformanceTunerOverviewEnabletheAPIIntegratethepluginInitializethelibraryandverifyoperationDefineannotations,fidelityparameters,andqualitylevelsAddloadingtimerecordingfunctionsRunthemonitorappReviewandpublishTroubleshootcommonerrorsReferenceDevelopwithUnrealRequestinguserpermissionsSecureyourgame
Gamebestpractices
MaximizedeviceavailabilitySupport64-bitarchitecturesDevelopgamesforallscreensSign-in,savegames,andmorewithPlayGamesServices
ArtassetsGeometrybestpractices
OpenGLandVulkanDeviceorientationefficientlyinVulkanVertexdatamanagement
GameModeOverviewOptimizewithGameModeAPIGameModeinterventions
OptimizeCPU,memory,andgraphicstoolsAndroidPerformanceTuner
GuidesImprovegameperformanceReducegamesize
DistributeOverviewReleasewithGooglePlayInstantPlayasyoudownload
Bestpractices
TestingOverviewFundamentalsoftestingSetupproject
BuildingeffectiveunittestsOverviewBuildinglocalunittestsBuildinginstrumentedunittests
AutomatingUItestsOverviewTestingUIforasingleappTestingUIformultipleapps
TestingappcomponentintegrationsOverviewTestingyourserviceTestingyourcontentproviderTestingUIperformance
EspressoOverviewSetupinstructionsBasicsRecipesMultiprocessAccessibilitycheckingListsIntentsWebIdlingresourceCheatsheetAdditionalresourcesUIAutomatorAppCrawlerJUnit4RulesAndroidJUnitRunnerReleasenotesAdditionalresources
PerformanceOverviewPerformanceclass
AndroidVitalsOverviewStuckPartialWakeLocksExcessiveWakeupsExcessiveBackgroundWi-FiScansExcessiveBackgroundNetworkUsageANRsCrashesSlowRenderingFrozenFramesPermissionDenialsAppStartupTimeAppStandbyBucketsAppHibernationProcessesandThreadsOverviewBetterPerformancethroughThreading
OptimizingforBatteryLifeOverviewOptimizeforDozeandAppStandbyMonitorthebatterylevelandchargingstateMonitorconnectivitystatusandconnectionmeteringDetermineandmonitorthedockingstateandtypePowermanagementrestrictionsProfilebatteryusagewithBatterystatsandBatteryHistorianAnalyzepowerusewithBatteryHistorianTestingpower-relatedissuesReduceyourappsize
ManagememoryOverviewofMemoryManagemementMemoryAllocationamongProcessesManageYourApp'sMemory
SystemtracingOverviewCaptureatracefromthecommandlineCaptureatraceonadeviceNavigateareportDefinecustomeventsCustomtraceeventsinnativecodeInspectGPUrenderingDesigningforSeamlessnessKeepingYourAppResponsivePerformanceTipsSMPPrimerforAndroidVerifyingAppBehaviorontheAndroidRuntime(ART)
AccessibilityOverview
BuildandtestappsforaccessibilityMakeappsmoreaccessiblePrinciplesforimprovingappaccessibilityTestyourapp'saccessibility
AdvancedtopicsMakecustomviewsmoreaccessibleCreateyourownaccessibilityserviceAdditionalresources
PrivacyPrivacybestpractices
SecurityAppsecuritybestpracticesSecuritytipsSecuritywithdataSecuritywithdataacrossadditionalAndroidversionsSecuritywithHTTPSandSSLNetworksecurityconfigurationUpdatingyoursecurityprovidertoprotectagainstSSLexploits
ProtectingagainstsecuritythreatswithSafetyNetOverviewSafetyNetAttestationAPISafetyNetSafeBrowsingAPISafetyNetreCAPTCHAAPISafetyNetVerifyAppsAPICryptographyAndroidKeystoreSystemVerifyinghardware-backedkeypairswithkeyattestationAndroidProtectedConfirmationSupportingDirectBootRunningembeddedDEXcodeAppsecurityimprovementprogram
BuildforBillionsOverviewConnectivityDevicecapabilityDatacostBatteryconsumptionUIandcontent
BuildforEnterpriseOverviewDeveloperguideWorkprofilesSetupmanagedconfigurations
AppfeedbackSendappfeedbacktoEMMsTestappfeedbackWorkcontactsDevicemanagementpolicies
DevicemanagementOverviewBuildadevicepolicycontroller
DedicateddevicesOverviewLocktaskmodeMultipleusersCookbookDevicecontrolNetworkingandtelephonySecuritySystemupdatesNetworkactivitylogging
AndroidversionsOverviewAndroid12Android11Android10Android9Android8.0Android7.0Deviceadministration
AndroidDevelopers
Docs
Guides
EmojiCompatibility
Caution:Asoflate2021,theandroidx.emoji:emoji
libraryisdeprecatedinfavorofandroidx.emoji2:emoji2,which
providesintegrationintoandroidx.appcompat.
Tosupportmodernemojiandsimplifybackward-compatibilitywithlower
versionsofAndroid,it'srecommendedthatyoumigratetothe
androidx.emoji2:emoji2
library.Fordetailsonhowtoimplement,see
Supportmodernemoji.
TheEmojiCompatsupportlibraryaimsto
keepAndroiddevicesuptodatewiththelatestemoji.Itpreventsyourapp
fromshowingmissingemojicharactersintheformof☐,which
indicatesthatyourdevicedoesnothaveafonttodisplaythetext.By
usingtheEmojiCompatsupportlibrary,
yourappusersdonotneedtowaitforAndroidOSupdatestogetthelatest
emoji.
Figure1.Emojicomparison
Refertothefollowingrelatedresources:
EmojiCompatibilitysampleapp
Java|Kotlin
HowdoesEmojiCompatwork?
TheEmojiCompatsupportlibraryprovides
classestoimplementbackward-compatibleemojisupportondevicesrunning
Android4.4(APIlevel19)andhigher.Youcanconfigure
EmojiCompatwitheitherbundledor
downloadablefonts.Formoreinformationaboutconfiguration,refertothe
followingsections:
Downloadablefontsconfiguration
Bundledfontsconfiguration
EmojiCompatidentifiesemojiforagiven
CharSequence,replacesthemwith
EmojiSpans,ifrequired,and
finallyrenderstheemojiglyphs.Figure2demonstratestheprocess.
Figure2.EmojiCompatprocess
Downloadablefontsconfiguration
ThedownloadablefontsconfigurationusestheDownloadableFontssupport
libraryfeaturetodownloadanemojifont.Italsoupdatesthenecessary
emojimetadatathattheEmojiCompat
supportlibraryneedstokeepupwiththelatestversionsoftheUnicode
specification.
Addingsupportlibrarydependency
TousetheEmojiCompatsupportlibrary,
youmustmodifyyourappproject'sclasspathdependencieswithinyour
developmentenvironment.
Toaddasupportlibrarytoyourapplicationproject:
Openthebuild.gradlefileofyourapplication.
Addthesupportlibrarytothedependenciessection.
Groovy
dependencies{
...
implementation"com.android.support:support-emoji:28.0.0"
}
Kotlin
dependencies{
...
implementation("com.android.support:support-emoji:28.0.0")
}
Initializingthedownloadablefont
configuration
YouneedtoinitializeEmojiCompatto
loadthemetadataandthetypeface.Sinceinitializationcantakesometime,
theinitializationprocessrunsonabackgroundthread.
ToinitializeEmojiCompatwiththe
downloadablefontconfiguration,performthefollowingsteps:
CreateaninstanceoftheFontRequest
classandprovidethefontproviderauthority,thefontproviderpackage,
thefontquery,andalistofsetsofhashesforthecertificate.Formore
informationaboutFontRequest,refer
tothe
UsingDownloadableFontsprogrammatically
sectionintheDownloadableFonts
documentation.
Createaninstanceof
FontRequestEmojiCompatConfig
andprovideinstancesofContextand
FontRequest.
InitializeEmojiCompatbycallingthe
init()
methodandpasstheinstanceof
FontRequestEmojiCompatConfig.
Kotlin
classMyApplication:Application(){
overridefunonCreate(){
super.onCreate()
valfontRequest=FontRequest(
"com.example.fontprovider",
"com.example",
"emojicompatFontQuery",
CERTIFICATES
)
valconfig=FontRequestEmojiCompatConfig(this,fontRequest)
EmojiCompat.init(config)
}
}
Java
publicclassMyApplicationextendsApplication{
@Override
publicvoidonCreate(){
super.onCreate();
FontRequestfontRequest=newFontRequest(
"com.example.fontprovider",
"com.example",
"emojicompatFontQuery",
CERTIFICATES);
EmojiCompat.Configconfig=newFontRequestEmojiCompatConfig(this,fontRequest);
EmojiCompat.init(config);
}
}
UseEmojiCompatwidgetsinlayout
XMLs.IfyouareusingAppCompat,
refertothe
UsingEmojiCompatwidgetswithAppCompat
section.
Formoreinformationabouthowtoconfigure
EmojiCompatwiththedownloadablefont
configuration,gotoEmojiCompatibilitysampleapp
Java
|Kotlin.
Librarycomponents
Figure3.LibrarycomponentsintheEmojiCompatprocess
Widgets:EmojiEditText,
EmojiTextView,
EmojiButton
Defaultwidgetimplementationstouse
EmojiCompatwith
TextView,EditText,and
Button.
EmojiCompat
Mainpublicsurfaceforthesupportlibrary.Itperformsallthe
externalcallsandcoordinateswiththeotherpartsofthesystem.
EmojiCompat.Config
Configuresthesingletoninstancetobecreated.
EmojiSpan
AReplacementSpansubclassthatreplacesthe
character(sequences)andrenderstheglyph.
EmojiCompatFont
EmojiCompatusesafonttodisplay
emoji.Thisfontisamodifiedversionofthe
AndroidEmojifont.
Thefontismodifiedasfollows:
Toprovidebackwardcompatibilitytorenderemoji,allemoji
charactersarerepresentedwithasingleUnicodecodepointin
Unicode’sSupplementalPrivateUseArea-AstartingwithU+F0001.
Extraemojimetadataisinsertedinabinaryformatintothefontand
isparsedatruntimeby
EmojiCompat.Thedataisembedded
inthefont’smetatable,withtheprivatetag
Emji.
Configurationoptions
YoucanusetheEmojiCompatinstanceto
modifyEmojiCompatbehavior.Youcanuse
thefollowingmethodsfromthebaseclasstosettheconfiguration:
setReplaceAll():
DetermineswhetherEmojiCompatshould
replaceallemojiitfindswith
EmojiSpans.Bydefault,
EmojiCompattriesitsbestto
understandifthesystemcanrenderanemojianddoesnotreplacethose
emoji.Whensettotrue,
EmojiCompatreplacesallemojiitfinds
withEmojiSpans.
setEmojiSpanIndicatorEnabled():Indicateswhether
EmojiCompathasreplacedanemojiwith
an
EmojiSpan.Whensettotrue,
EmojiCompatdrawsabackgroundforthe
EmojiSpan.Thismethodismainlyused
fordebuggingpurposes.
setEmojiSpanIndicatorColor():
SetsthecolortoindicateanEmojiSpan.
ThedefaultvalueisGREEN.
registerInitCallback:
Informsappaboutthestateofthe
EmojiCompatinitialization.
Kotlin
valconfig=FontRequestEmojiCompatConfig(...)
.setReplaceAll(true)
.setEmojiSpanIndicatorEnabled(true)
.setEmojiSpanIndicatorColor(Color.GREEN)
.registerInitCallback(object:EmojiCompat.InitCallback(){
...
})
Java
EmojiCompat.Configconfig=newFontRequestEmojiCompatConfig(...)
.setReplaceAll(true)
.setEmojiSpanIndicatorEnabled(true)
.setEmojiSpanIndicatorColor(Color.GREEN)
.registerInitCallback(newInitCallback(){...})
Addinginitializationlisteners
EmojiCompatand
EmojiCompatclasses
provide
registerInitCallback()
and
unregisterInitCallback()
methodstoregisteraninitializationcallback.Tousethesemethods,create
aninstanceofthe
EmojiCompat.InitCallbackclass.Call
thesemethodsandpasstheinstanceofthe
EmojiCompat.InitCallbackclass.Whenthe
initializationoftheEmojiCompatsupport
libraryissuccessful,theEmojiCompat
classcallsthe
onInitialized()
method.Ifthelibrary
failstoinitialize,theEmojiCompat
classcallsthe
onFailed()
method.
Tochecktheinitializationstateatanypoint,callthe
getLoadState()
method.Itreturnsoneofthefollowingvalues:
LOAD_STATE_LOADING,
LOAD_STATE_SUCCEEDED,
orLOAD_STATE_FAILED.
UsingEmojiCompatwithAppCompatwidgets
IfyouareusingAppCompatwidgets,you
canuseEmojiCompatwidgetsthatextend
fromAppCompatwidgets.
Addthesupportlibrarytothedependenciessection.
Groovy
dependencies{
...
implementation"com.android.support:support-emoji-bundled:$version"
}
Kotlin
dependencies{
implementation("com.android.support:support-emoji-appcompat:$version")
}
Groovy
dependencies{
implementation"com.android.support:support-emoji-appcompat:$version"
}
UseEmojiCompat
AppCompatWidgetwidgetsinlayout
XMLs.
Bundledfontsconfiguration
TheEmojiCompatsupportlibraryisalso
availableinabundledfontversion.Thispackageincludesthefontwiththe
embeddedmetadata.Thepackagealsoincludesa
BundledEmojiCompatConfig
thatusestheAssetManagertoloadthemetadata
andfonts.
Note:Thesizeofthefontisinmultiple
megabytes.
Addingsupportlibrarydependency
TousetheEmojiCompatsupportlibrary
withbundledfontconfiguration,youmustmodifyyourappproject's
classpathdependencieswithinyourdevelopmentenvironment.
Toaddasupportlibrarytoyourapplicationproject:
Openthebuild.gradlefileofyourapplication.
Addthesupportlibrarytothedependenciessection.
Groovy
dependencies{
...
implementation"com.android.support:support-emoji:28.0.0"
}
Kotlin
dependencies{
...
implementation("com.android.support:support-emoji:28.0.0")
}
UsingbundledfontstoconfigureEmojiCompat
Tousebundledfontstoconfigure
EmojiCompat,performthefollowingsteps:
UseBundledEmojiCompatConfig
tocreateaninstanceofEmojiCompat
andprovideaninstanceofContext.
Callthe
init()
methodtoinitialize
EmojiCompatandpasstheinstanceof
BundledEmojiCompatConfig.
Kotlin
classMyApplication:Application(){
overridefunonCreate(){
super.onCreate()
valconfig=BundledEmojiCompatConfig(this)
EmojiCompat.init(config)
}
}
Java
publicclassMyApplicationextendsApplication{
@Override
publicvoidonCreate(){
super.onCreate();
EmojiCompat.Configconfig=newBundledEmojiCompatConfig(this);
EmojiCompat.init(config);
...
}
}
UsingEmojiCompatwithoutwidgets
EmojiCompatuses
EmojiSpantorendercorrectimages.
Therefore,ithastoconvertanygivenCharSequenceinto
Spannedinstanceswith
EmojiSpans.The
EmojiCompatclassprovidesamethodto
convertCharSequencesinto
Spannedinstanceswith
EmojiSpans.Usingthismethod,
youcanprocessandcachetheprocessedinstancesinsteadoftherawstring,
whichimprovesthepeformanceofyourapplication.
Kotlin
valprocessed=EmojiCompat.get().process("neutralface\uD83D\uDE10")
Java
CharSequenceprocessed=EmojiCompat.get().process("neutralface\uD83D\uDE10");
UsingEmojiCompatforIMEs
UsingtheEmojiCompatsupportlibrary,
keyboardscanrendertheemojisupportedbytheapplicationtheyare
interactingwith.IMEscanusethe
hasEmojiGlyph()
methodtocheckifEmojiCompatiscapable
ofrenderinganemoji.ThismethodtakesaCharSequenceof
anemojiandreturnstrueif
EmojiCompatcandetectandrenderthe
emoji.
Thekeyboardcanalsochecktheversionofthe
EmojiCompatsupportlibrarythattheapp
supportstodeterminewhichemojitorenderinthepalette.Tocheckthe
version,ifavailable,thekeyboardneedstocheckwhetherthefollowing
keysexistinthe
EditorInfo.extras
bundle:
EDITOR_INFO_METAVERSION_KEY
Ifthekeyexistsinthebundle,thevaluerepresentsthe
versionoftheemojimetadatathattheappuses.Ifthiskeydoesnot
exist,theappisnotusingEmojiCompat.
EDITOR_INFO_REPLACE_ALL_KEY
Ifthekeyexistsandissettotrue,thisindicatesthat
theapphascalledthe
SetReplaceAll()
method.Formoreinformationabout
EmojiCompatconfiguration,
refertotheConfigurationoptions
section.
Afterreceivingthekeysinthe
EditorInfo.extrasbundle,
thekeyboardcanusethe
hasEmojiGlyph()
method,wheremetadataVersionisthevaluefor
EDITOR_INFO_METAVERSION_KEY,
tocheckwhethertheappcanrenderaspecificemoji.
UsingEmojiCompatwithcustomwidgets
Youcanalwaysusetheprocess()
methodtopreprocesstheCharSequenceinyourappandadd
ittoanywidgetthatcanrenderSpannedinstances;for
example,TextView.Inaddition,
EmojiCompatprovidesthefollowingwidget
helperclassestoletyouenrichyourcustomwidgetswithemojisupportwith
minimumeffort.
EmojiTextViewHelper
EmojiEditTextHelper
SampleTextView
Kotlin
classMyTextView(context:Context):AppCompatTextView(context){
privatevalemojiTextViewHelper:EmojiTextViewHelperbylazy(LazyThreadSafetyMode.NONE){
EmojiTextViewHelper(this).apply{
updateTransformationMethod()
}
}
overridefunsetFilters(filters:Array){
super.setFilters(emojiTextViewHelper.getFilters(filters))
}
overridefunsetAllCaps(allCaps:Boolean){
super.setAllCaps(allCaps)
emojiTextViewHelper.setAllCaps(allCaps)
}
}
Java
publicclassMyTextViewextendsAppCompatTextView{
...
publicMyTextView(Contextcontext){
super(context);
init();
}
...
privatevoidinit(){
getEmojiTextViewHelper().updateTransformationMethod();
}
@Override
publicvoidsetFilters(InputFilter[]filters){
super.setFilters(getEmojiTextViewHelper().getFilters(filters));
}
@Override
publicvoidsetAllCaps(booleanallCaps){
super.setAllCaps(allCaps);
getEmojiTextViewHelper().setAllCaps(allCaps);
}
privateEmojiTextViewHelpergetEmojiTextViewHelper(){
...
}
}
SampleEditText
Kotlin
classMyEditText(context:Context):AppCompatEditText(context){
privatevalemojiEditTextHelper:EmojiEditTextHelperbylazy(LazyThreadSafetyMode.NONE){
EmojiEditTextHelper(this).also{
super.setKeyListener(it.getKeyListener(keyListener))
}
}
overridefunsetKeyListener(input:KeyListener?){
input?.also{
super.setKeyListener(emojiEditTextHelper.getKeyListener(it))
}
}
overridefunonCreateInputConnection(outAttrs:EditorInfo):InputConnection{
valinputConnection:InputConnection=super.onCreateInputConnection(outAttrs)
returnemojiEditTextHelper.onCreateInputConnection(
inputConnection,
outAttrs
)asInputConnection
}
}
Java
publicclassMyEditTextextendsAppCompatEditText{
...
publicMyEditText(Contextcontext){
super(context);
init();
}
...
privatevoidinit(){
super.setKeyListener(getEmojiEditTextHelper().getKeyListener(getKeyListener()));
}
@Override
publicvoidsetKeyListener(android.text.method.KeyListenerkeyListener){
super.setKeyListener(getEmojiEditTextHelper().getKeyListener(keyListener));
}
@Override
publicInputConnectiononCreateInputConnection(EditorInfooutAttrs){
InputConnectioninputConnection=super.onCreateInputConnection(outAttrs);
returngetEmojiEditTextHelper().onCreateInputConnection(inputConnection,outAttrs);
}
privateEmojiEditTextHelpergetEmojiEditTextHelper(){
...
}
}
Frequentlyaskedquestions
HowdoIinitiatethefontdownload?
Theemojifontsaredownloadedonfirstrequest,iftheydonotexist
onthedevice.Thedownloadschedulingistransparenttotheapp.
Howmuchtimedoesittaketoinitialize?
Afterthefontisdownloaded,ittakesapproximately150milliseconds
toinitializeEmojiCompat.
HowmuchmemorydoestheEmojiCompatsupportlibraryuse?
Currently,thedatastructuretofindtheemojiisloadedintheapp’s
memoryandusesaround200KB.
CanIuseEmojiCompatforacustomTextView?
Yes.EmojiCompatprovideshelperclassesforcustomwidgets.Itisalso
possibletopreprocessagivenstringandconvertitto
Spanned.Formoreinformationaboutwidgethelper
classes,refertothe
UsingEmojiCompatwithcustomwidgets
section.
WhathappensifIaddwidgetsinlayoutXMLsondevicesthat
runonAndroid4.4(APIlevel19)orlower?
YoucanincludetheEmojiCompat
supportlibraryoritswidgetsinyourapplicationsthatsupportdevices
runningAndroid4.4(APIlevel19)orlower.However,ifadeviceruns
onanAndroidversionpriortoAPIlevel19,
EmojiCompatanditswidgetsareina
"nooperation"state.Thismeansthat
EmojiTextViewbehavesexactly
likearegularTextView.
EmojiCompatinstance;itimmediately
getsintoa
LOAD_STATE_SUCCEEDED
statewhenyoucallthe
init()
method.
Additionalresources
Foradditionalinformationonusingthe
EmojiCompat
library,watchEmojiCompat.
ContentandcodesamplesonthispagearesubjecttothelicensesdescribedintheContentLicense.JavaisaregisteredtrademarkofOracleand/oritsaffiliates.
Lastupdated2021-11-11UTC.
[{
"type":"thumb-down",
"id":"missingTheInformationINeed",
"label":"MissingtheinformationIneed"
},{
"type":"thumb-down",
"id":"tooComplicatedTooManySteps",
"label":"Toocomplicated/toomanysteps"
},{
"type":"thumb-down",
"id":"outOfDate",
"label":"Outofdate"
},{
"type":"thumb-down",
"id":"samplesCodeIssue",
"label":"Samples/codeissue"
},{
"type":"thumb-down",
"id":"otherDown",
"label":"Other"
}]
[{
"type":"thumb-up",
"id":"easyToUnderstand",
"label":"Easytounderstand"
},{
"type":"thumb-up",
"id":"solvedMyProblem",
"label":"Solvedmyproblem"
},{
"type":"thumb-up",
"id":"otherUp",
"label":"Other"
}]
Twitter
Follow@AndroidDevonTwitter
YouTube
CheckoutAndroidDevelopersonYouTube
MoreAndroid
Android
AndroidforEnterprise
Security
Source
News
Blog
Podcasts
Discover
Gaming
MachineLearning
Privacy
5G
AndroidDevices
Largescreens
WearOS
AndroidTV
Androidforcars
AndroidThings
ChromeOSdevices
Releases
Android11
Android10
Pie
Oreo
Nougat
Marshmallow
Lollipop
KitKat
DocumentationandDownloads
AndroidStudioguide
Developersguides
APIreference
DownloadStudio
AndroidNDK
Support
Reportplatformbug
Reportdocumentationbug
GooglePlaysupport
Joinresearchstudies
Android
Chrome
Firebase
GoogleCloudPlatform
Allproducts
Privacy
License
Brandguidelines
Getnewsandtipsbyemail
Subscribe
Language
English
BahasaIndonesia
Español–AméricaLatina
Português–Brasil
中文–简体
日本語
한국어