com.demoapp.DemoAppNativePackage.java Source code

Java tutorial

Introduction

Here is the source code for com.demoapp.DemoAppNativePackage.java

Source

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.demoapp;

import android.content.Context;

import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;

import java.util.Collections;
import java.util.List;

public class DemoAppNativePackage implements ReactPackage {

    private final NativeModule mModule;

    DemoAppNativePackage(Context context) {
        mModule = new DemoAppNativeModule(context);
    }

    @Override
    public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
        return Collections.singletonList(mModule);
    }

    @Override
    public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
        return Collections.emptyList();
    }
}