相关疑难解决方法(0)

如何从非反应类发送反应应用程序上下文?

我需要更新状态更改,例如 android 和 react 本机类之间的事件?

public class MessagingService extends FirebaseMessagingService {
      @Override
      public void onMessageReceived(RemoteMessage remoteMessage) {
        Log.d(TAG, "Push Message Received ");
        buildLocalNotification(remoteMessage);
      }

      public void buildLocalNotification(RemoteMessage message) {
        ...
        FBMessagingHelper notificationHelper = new FBMessagingHelper(this.getApplication());
        notificationHelper.showNotification(bundle);
      }
    }
Run Code Online (Sandbox Code Playgroud)

ReactApplicationContext当类扩展到 FBMessingService 时,如何创建构造函数?

FBMessagingHelper notificationHelper = new FBMessagingHelper(this.getApplication());
// Getting Error as a parameter is not react app context
Run Code Online (Sandbox Code Playgroud)

我需要更新IN_VIDEO_PROGRESS状态

  1. 更新到Android视频开始/停止时间React Native
  2. 更新到React Native视频开始/停止时间Android
public class FBMessagingHelper extends ReactContextBaseJavaModule {
  private …
Run Code Online (Sandbox Code Playgroud)

android bridge ios reactjs react-native

5
推荐指数
1
解决办法
664
查看次数

标签 统计

android ×1

bridge ×1

ios ×1

react-native ×1

reactjs ×1