mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-13 01:18:56 +08:00
Get update folder method (#1323)
* Exposed current update path. * Check for null * API reference update
This commit is contained in:
committed by
Alexander Goncharov
parent
da56a35959
commit
201735ebad
@@ -17,7 +17,6 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.NotActiveException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -159,6 +158,14 @@ public class CodePush implements ReactPackage {
|
||||
}
|
||||
}
|
||||
|
||||
public String getPackageFolder() {
|
||||
JSONObject codePushLocalPackage = mUpdateManager.getCurrentPackage();
|
||||
if (codePushLocalPackage == null) {
|
||||
return null;
|
||||
}
|
||||
return mUpdateManager.getPackageFolderPath(codePushLocalPackage.optString("packageHash"));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static String getBundleUrl() {
|
||||
return getJSBundleFile();
|
||||
|
||||
Reference in New Issue
Block a user