小编Jan*_*man的帖子

EmojiCompat for Huawei devices

I would like to support emojis for Huawei devices in my app. For all other vendors I use code like this to init EmojiCompat:

 val fontRequest = FontRequest(
            "com.google.android.gms.fonts",
            "com.google.android.gms",
            "Noto Color Emoji Compat",
            R.array.com_google_android_gms_fonts_certs
        )
        val config = FontRequestEmojiCompatConfig(context, fontRequest)
        EmojiCompat.init(config)
Run Code Online (Sandbox Code Playgroud)

But for Huawei devices, for they do not have access to google resources (my guess), it does not work, and EmojiCompat doesn't get initialized. I know that BundledEmojiCompatConfig could be used, but I would prefer always to fetch …

fonts android emoji google-fonts huawei-mobile-services

5
推荐指数
1
解决办法
749
查看次数