当前位置: 首页>>代码示例>>Java>>正文


Java ReactApplicationContext.addActivityEventListener方法代码示例

本文整理汇总了Java中com.facebook.react.bridge.ReactApplicationContext.addActivityEventListener方法的典型用法代码示例。如果您正苦于以下问题:Java ReactApplicationContext.addActivityEventListener方法的具体用法?Java ReactApplicationContext.addActivityEventListener怎么用?Java ReactApplicationContext.addActivityEventListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.facebook.react.bridge.ReactApplicationContext的用法示例。


在下文中一共展示了ReactApplicationContext.addActivityEventListener方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: RNSettingsModule

import com.facebook.react.bridge.ReactApplicationContext; //导入方法依赖的package包/类
public RNSettingsModule(ReactApplicationContext reactContext) {
  super(reactContext);
  this.mReactContext = reactContext;

  this.registerReceiver(reactContext, Constants.PROVIDERS_CHANGED, new LocationReceiver());
  this.registerReceiver(reactContext, Constants.AIRPLANE_MODE_CHANGED, new AirplaneModeReceiver());

  mSettingsHandlers.put(Constants.LOCATION_SETTING, new LocationSettingsHandler(reactContext));
  mSettingsHandlers.put(Constants.AIRPLANE_MODE_SETTING, new AirplaneModeSettingsHandler(reactContext));

  mOpenSettingToRequestCode.put(Settings.ACTION_LOCATION_SOURCE_SETTINGS, 0);
  mOpenSettingToRequestCode.put(Settings.ACTION_AIRPLANE_MODE_SETTINGS, 1);

  mRequestCodeToOpenSetting.put(0, Settings.ACTION_LOCATION_SOURCE_SETTINGS);
  mRequestCodeToOpenSetting.put(1, Settings.ACTION_AIRPLANE_MODE_SETTINGS);

  mOpenSettingToSettingsName.put(Settings.ACTION_LOCATION_SOURCE_SETTINGS, Constants.LOCATION_SETTING);
  mOpenSettingToSettingsName.put(Settings.ACTION_AIRPLANE_MODE_SETTINGS, Constants.AIRPLANE_MODE_SETTING);

  reactContext.addActivityEventListener(mActivityEventListener);
}
 
开发者ID:rmrs,项目名称:react-native-settings,代码行数:22,代码来源:RNSettingsModule.java

示例2: RNPushNotificationModule

import com.facebook.react.bridge.ReactApplicationContext; //导入方法依赖的package包/类
RNPushNotificationModule(ReactApplicationContext reactContext) {
        super(reactContext);

        reactContext.addActivityEventListener(this);

        Application applicationContext = (Application) reactContext.getApplicationContext();
        // The @ReactNative methods use this
        mRNPushNotificationHelper = new RNPushNotificationHelper(applicationContext);
        // This is used to delivery callbacks to JS
        mJsDelivery = new RNPushNotificationJsDelivery(reactContext);

        registerNotificationsRegistration();

//        //必须要设置默认的通知回调或者订阅一个频道,否则接收不到通知
//        PushService.setDefaultPushCallback(reactContext.getApplicationContext(), mRNPushNotificationHelper.getMainActivityClass());
//        //this.subscribeChannel("public");
    }
 
开发者ID:zzzkk2009,项目名称:react-native-leancloud-sdk,代码行数:18,代码来源:RNPushNotificationModule.java

示例3: CafeBazaar

import com.facebook.react.bridge.ReactApplicationContext; //导入方法依赖的package包/类
public CafeBazaar(ReactApplicationContext reactContext, String licenseKey) {
    super(reactContext);
    _reactContext = reactContext;
    this.LICENSE_KEY = licenseKey;

    reactContext.addActivityEventListener(this);
}
 
开发者ID:contoriel,项目名称:react-native-cafe-bazaar,代码行数:8,代码来源:CafeBazaar.java

示例4: RNMessageComposeModule

import com.facebook.react.bridge.ReactApplicationContext; //导入方法依赖的package包/类
public RNMessageComposeModule(final ReactApplicationContext reactContext) {
    super(reactContext);
    reactContext.addActivityEventListener(mActivityEventListener);
}
 
开发者ID:joonhocho,项目名称:react-native-message-compose,代码行数:5,代码来源:RNMessageComposeModule.java

示例5: OnfidoSDK

import com.facebook.react.bridge.ReactApplicationContext; //导入方法依赖的package包/类
public OnfidoSDK(ReactApplicationContext reactContext) {
    super(reactContext);
    client = OnfidoFactory.create(reactContext).getClient();
    reactContext.addActivityEventListener(mActivityEventListener);
}
 
开发者ID:onfido,项目名称:onfido-sdk-react-native-sample-app,代码行数:6,代码来源:OnfidoSDK.java

示例6: init

import com.facebook.react.bridge.ReactApplicationContext; //导入方法依赖的package包/类
private void init(@NonNull ReactApplicationContext context) {
    eventResultListener = new MercadoPagoCheckoutEventListener();
    context.addActivityEventListener(eventResultListener);
}
 
开发者ID:BlackBoxVision,项目名称:react-native-mercadopago-checkout,代码行数:5,代码来源:MercadoPagoCheckoutModule.java

示例7: RNMailComposeModule

import com.facebook.react.bridge.ReactApplicationContext; //导入方法依赖的package包/类
public RNMailComposeModule(final ReactApplicationContext reactContext) {
    super(reactContext);
    reactContext.addActivityEventListener(mActivityEventListener);
}
 
开发者ID:joonhocho,项目名称:react-native-mail-compose,代码行数:5,代码来源:RNMailComposeModule.java


注:本文中的com.facebook.react.bridge.ReactApplicationContext.addActivityEventListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。