昨天谷歌在Google I/O上展示了基于新Firebase的新通知系统.我在Github上尝试了这个新的FCM(Firebase云消息传递)示例.
尽管我已声明了特定的drawable,但通知的图标始终是ic_launcher
为什么?以下是处理邮件的官方代码
public class AppFirebaseMessagingService extends FirebaseMessagingService {
/**
* Called when message is received.
*
* @param remoteMessage Object representing the message received from Firebase Cloud Messaging.
*/
// [START receive_message]
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
// If the application is in the foreground handle both data and notification messages here.
// Also if you intend on generating your own notifications as a result of a received FCM
// message, here is where that should …Run Code Online (Sandbox Code Playgroud) android push-notification googleio firebase firebase-cloud-messaging
Android编程让我发疯.用于GUI开发的XML或可编程方式正在制作正确的老狗早餐代码 - 这里有些东西,有些东西.
我目前的挫败感是试图保留所有XML,我想设置与a的背景颜色TextView相同颜色的背景颜色,Button而不必指定确切的颜色代码.我想使用系统常量,类似于java.awt.SystemColor.control,但在XML中指定.
无论如何这样做而不必重新指定一堆东西?我正在寻找一个解决方案:android:background="{Insert constant here}".