mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-04-28 22:39:50 +00:00
3.4.6
- Fixed the issue where the virtual machine wouldn't run when the filename contained parentheses. - Added Google Play services.
This commit is contained in:
parent
f6ec5d12f5
commit
14943b8844
10 changed files with 230 additions and 28 deletions
39
app/src/main/java/com/vectras/vm/FCMService.java
Normal file
39
app/src/main/java/com/vectras/vm/FCMService.java
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
package com.vectras.vm;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.firebase.messaging.FirebaseMessagingService;
|
||||
import com.google.firebase.messaging.RemoteMessage;
|
||||
import com.vectras.vm.utils.NotificationUtils;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class FCMService
|
||||
extends FirebaseMessagingService {
|
||||
@Override
|
||||
public void onMessageReceived(@NonNull RemoteMessage message) {
|
||||
|
||||
if (message.getNotification() != null) {
|
||||
String title = message.getNotification().getTitle();
|
||||
String body = message.getNotification().getBody();
|
||||
|
||||
Map<String, String> data = message.getData();
|
||||
|
||||
NotificationUtils.pushNow(this,
|
||||
1,
|
||||
NotificationUtils.generalChannelId,
|
||||
title,
|
||||
body,
|
||||
R.drawable.ic_vectras_vm_48 ,
|
||||
data.get("largeImage") ,
|
||||
-1,
|
||||
data.get("url"),
|
||||
null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNewToken(@NonNull String token) {
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue