From c51c944430ea0fc51a7e7d86321151f2622f712c Mon Sep 17 00:00:00 2001 From: DengYun Date: Mon, 11 Jul 2016 18:57:43 +0800 Subject: [PATCH] Update guide.md --- docs/guide.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/guide.md b/docs/guide.md index 43e76b3..86d1699 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -71,7 +71,25 @@ npm config set disturl https://npm.taobao.org/dist --global ## 配置Bundle URL(Android) -在你的ReactActivity中增加如下代码: +`0.29及以后版本`:在你的MainApplication中增加一下代码: + +```java +// ... 其它代码 + +import cn.reactnative.modules.update.UpdateContext; +public class MainApplication extends Application implements ReactApplication { + + private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { + @Override + protected String getJSBundleFile() { + return UpdateContext.getBundleUrl(this); + } + // ... 其它代码 + } +} +``` + +`0.28及以前版本`:在你的MainActivity中增加如下代码: ```java // ... 其它代码