用户2738867
用户2738867
  • 发布:2025-04-16 12:08
  • 更新:2025-04-16 12:08
  • 阅读:15

uniapp如何使用app原生的服务

分类:uni-app

public class MyFirebaseMessagingService extends FirebaseMessagingService {  
    private static final String TAG = "FCMToken3";  

    @Override  
    public void onMessageReceived(RemoteMessage remoteMessage) {  
        // 处理接收到的消息  
        Log.d(TAG, "From: " + remoteMessage.getFrom());  
        if (remoteMessage.getNotification() != null) {  
            Log.d(TAG, "Message Notification Body: " + remoteMessage.getNotification().getBody());  
            // 取得推送消息的數據  
            String title = remoteMessage.getNotification().getTitle();  
            String body = remoteMessage.getNotification().getBody();  
            // 創建通知  
            createNotification(title, body);  
        }  
    }  
}

这是我原生插件中含有的class 但是我将原生插件打包之后 在uniapp上重新打包自定义基座运行 该服务是不生效的 但是在离线包运行的时候 这个服务是生效的 我该如何在hublider上面运行的时候 使这段服务生效?

android离线包打包aab appkey错误另外这个问题还有关注吗 因为打包apk都是正常的 但aab一直会报appkey错误的问题

2025-04-16 12:08 负责人:无 分享
已邀请:

要回复问题请先登录注册