server url pls

This commit is contained in:
scottbommarito
2016-05-13 17:22:34 -07:00
parent 4baedf7a06
commit 7ae7b48eac
28 changed files with 139 additions and 76 deletions

View File

@@ -73,7 +73,7 @@ public class CodePush implements ReactPackage {
private String appVersion;
private int buildVersion;
private String deploymentKey;
private final String serverUrl = "https://codepush.azurewebsites.net/";
private String serverUrl = "https://codepush.azurewebsites.net/";
private Activity mainActivity;
private Context applicationContext;
@@ -111,6 +111,11 @@ public class CodePush implements ReactPackage {
clearDebugCacheIfNeeded();
}
public CodePush(String deploymentKey, Activity mainActivity, boolean isDebugMode, String serverUrl) {
this(deploymentKey, mainActivity, isDebugMode);
this.serverUrl = serverUrl;
}
private void clearDebugCacheIfNeeded() {
if (isDebugMode && isPendingUpdate(null)) {
// This needs to be kept in sync with https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManager.java#L78