印地语 ttf 文件在用印地语发送 google 云通知消息时不起作用

hindi ttf file not working while sending google cloud notification messages in hindi

我想在通知面板中显示印地文文本,但是当我通过我的门户网站发送印地文文本时,android应用程序文本视图显示垃圾值类型字符,即使我使用的是 Typeface 字体

这是我从门户发送的文本

现在这是我在通知面板收到的文本

这是我通知中显示的文字 activity

下面是我的textview代码示例

Typeface hindiTypeface;
 public MyViewHolder(View itemView) {
            super(itemView);
            hindiTypeface=Typeface.createFromAsset(context.getAssets(),"hindi2.ttf");
            heading= (TextView) itemView.findViewById(R.id.tvHeading);
            message= (TextView) itemView.findViewById(R.id.tvMessage);
            image= (ImageView) itemView.findViewById(R.id.imgImage);
            heading.setTypeface(hindiTypeface);
            message.setTypeface(hindiTypeface);
}

不要使用 ttf 字体,错误在您的后端代码中。您可能从 server.Just 接收 unicode 使用 Html.fromHtml(message);

转换它