我有一个扩展FirebaseMessagingService
的类,并且我覆盖了onMessageReceived
,我想在onMessageReceived
中插入带空格的数据,但是我不能这样做。
public class MyFirebaseMessagingService extends FirebaseMessagingService{
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
.
.
.
AppDatabase.getINSTANCE(this).NotificationDao().insert(new NotificationTable(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody()));
}
}
我希望数据已插入数据库,但从未发生;