I create Firebase service and I want save data to room when I get Notification. I use MVP and I do not understand how can I use MVP in android.app.Service
public class MyFirebaseMessagingService extends FirebaseMessagingService {
@Inject
EventPresenter presenter;
public NfpFirebaseMessagingService() {
presenter = UserApplication.me().getAppComponent().getEventPresenter();
}
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
Map<String, String> data = remoteMessage.getData();
presenter.saveEvent(data);
sendNotification(remoteMessage.getData());
}
but my presenter has view and FirebaseMessagingService
- is not view. How can I realize MVP in this case?