昨天谷歌在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
我们来看一下server.js Hello World
var http = require("http");
http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.end("Hello World");
}).listen(80);
Run Code Online (Sandbox Code Playgroud)
如何在Firebase中使用它?
对不起,重复但答案是3yo
我有一个Android Studio项目它由一个的登录活动相对style,manifest,IntentService和其他的东西.
我想在许多其他应用程序中插入这个小项目,最好的方法是什么?模块是正确的方法吗?
最终的目标仍然是易于维护,例如如果有一天服务器应该更改URL,我就不必在使用此登录活动的任何应用程序中进行更改:-)