Created
September 11, 2019 19:23
-
-
Save flopshot/1745122e496c68fba31daea64f7053bf to your computer and use it in GitHub Desktop.
WhiteLabelConfig.java for Green Monkeys product flavor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WhiteLabelConfig.java for Green Monkeys product flavor | |
package com.whitelabeldemo; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.bridge.ReactContextBaseJavaModule; | |
import com.facebook.react.bridge.ReactMethod; | |
import javax.annotation.Nonnull; | |
public class WhiteLabelConfig extends ReactContextBaseJavaModule { | |
@Nonnull | |
private final String appName; | |
public WhiteLabelConfig(@Nonnull ReactApplicationContext reactContext) { | |
super(reactContext); | |
this.appName = reactContext | |
.getApplicationContext() | |
.getResources() | |
.getString(R.string.white_label_app_name); | |
} | |
@Nonnull | |
@Override | |
public String getName() { | |
return "WhiteLabelConfig"; | |
} | |
@Nonnull | |
@ReactMethod(isBlockingSynchronousMethod = true) | |
public String getAppName() { | |
return appName; | |
} | |
@Nonnull | |
@ReactMethod(isBlockingSynchronousMethod = true) | |
public String getPrimaryColor() { | |
return "#008000"; | |
} | |
@Nonnull | |
@ReactMethod(isBlockingSynchronousMethod = true) | |
public String getPrimaryTextColor() { | |
return "#FFD700"; | |
} | |
@Nonnull | |
@ReactMethod(isBlockingSynchronousMethod = true) | |
public String getGreetingText() { | |
return "Legends of the Hidden Temple Rocks!!!!!"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment