Created
September 11, 2019 18:11
-
-
Save flopshot/ff1089ed6fa40958728674acbac70734 to your computer and use it in GitHub Desktop.
WhiteLabelConfig.java for Purple Parrots 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 Purple Parrots 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 "#800080"; | |
} | |
@Nonnull | |
@ReactMethod(isBlockingSynchronousMethod = true) | |
public String getPrimaryTextColor() { | |
return "#FFD700"; | |
} | |
@Nonnull | |
@ReactMethod(isBlockingSynchronousMethod = true) | |
public String getGreetingText() { | |
return "Legends of the Hidden Temple Rules!!!!!"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment