Skip to content

Instantly share code, notes, and snippets.

@agrcrobles
Last active February 12, 2017 00:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agrcrobles/8906160304d2055bfa09c26079ed5a0c to your computer and use it in GitHub Desktop.
Save agrcrobles/8906160304d2055bfa09c26079ed5a0c to your computer and use it in GitHub Desktop.
package com.hellohybrid;
/**
* Created by zetta on 2/1/17.
*/
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableMap;
import java.util.Dictionary;
import java.util.Map;
public class HybridNavigationManager extends ReactContextBaseJavaModule{
public HybridNavigationManager(ReactApplicationContext reactContext) {
super(reactContext);
}
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
public String getName() {
return "HybridNavigationManager";
}
@ReactMethod
public void setTitle(int rootTag, String title) {
}
@ReactMethod
public void navigate(String name, ReadableMap params) {
}
}
@agrcrobles
Copy link
Author

agrcrobles commented Feb 12, 2017

    @Override
    public List<NativeModule> createNativeModules(
            ReactApplicationContext reactContext) {
        List<NativeModule> modules = new ArrayList<>();

        modules.add(new HybridNavigationManager(reactContext));

        return modules;
    }

https://gist.github.com/agrcrobles/f8702b8ea2a10b6fd79bb0a5a967c7d7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment