public class BoneDevHelper
extends java.lang.Object
getBundleInfoAsync(Context, String, OnBondBundleInfoGetListener)
2. 解析 Bundle 信息,并生成路由信息,用于打开调试面板,请参见 handleBundleInfo(Context, BoneBundleInfo)
3. 存取本地调试服务器的 ip 地址,请参见saveBoneDebugServer(Context, String) 和 readBoneDebugServer(Context)
4. 存取插件环境,请参见 savetPluginEnv(Context, String) 和 readPluginEnv(Context, String)| 限定符和类型 | 类和说明 |
|---|---|
static class |
BoneDevHelper.BoneBundleInfo
本地调试服务器返回的 Bundle 信息
|
static interface |
BoneDevHelper.OnBondBundleInfoGetListener
Bundle 信息监听接口
|
static class |
BoneDevHelper.RouterInfo
路由信息类
使用方式参考:
Router.getInstance().toUrl(context, url, bundle); |
| 构造器和说明 |
|---|
BoneDevHelper() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
getBundleInfoAsync(android.content.Context context,
java.lang.String ip,
BoneDevHelper.OnBondBundleInfoGetListener listener)
获取 Bundle 信息
|
BoneDevHelper.RouterInfo |
handleBundleInfo(android.content.Context context,
BoneDevHelper.BoneBundleInfo boneBundleInfo)
处理 Bundle 信息
|
static java.lang.String |
readBoneDebugServer(android.content.Context context)
获得之前存储的本地调试服务器的 ip 地址
参考
saveBoneDebugServer(Context, String) |
static java.lang.String |
readPluginEnv(android.content.Context context,
java.lang.String defaultValue)
获取之前存储的插件环境
参考
savetPluginEnv(Context, String) |
static void |
saveBoneDebugServer(android.content.Context context,
java.lang.String host)
存储本地调试服务器的 ip 地址
参考
readBoneDebugServer(Context) |
static void |
savetPluginEnv(android.content.Context context,
java.lang.String env)
存储插件环境
参考
readPluginEnv(Context, String) |
static void |
setDebugServerAndPort(android.content.Context context,
java.lang.String host,
int port)
设置 ReactNative 的 debug host & ip
通常开发者不需要调用这个函数,容器会自动处理
|
public void getBundleInfoAsync(android.content.Context context,
java.lang.String ip,
BoneDevHelper.OnBondBundleInfoGetListener listener)
context - 上下文ip - 本地调试服务器的 ip 地址listener - 回调, 请求完成后触发public BoneDevHelper.RouterInfo handleBundleInfo(android.content.Context context, BoneDevHelper.BoneBundleInfo boneBundleInfo)
context - 上下文boneBundleInfo - BoneDevHelper.OnBondBundleInfoGetListener.onSuccess(com.aliyun.alink.alirn.dev.BoneDevHelper.BoneBundleInfo)回调中获得的 Bundle 信息public static void setDebugServerAndPort(android.content.Context context,
java.lang.String host,
int port)
context - 上下文host - ip 地址port - 端口号public static void saveBoneDebugServer(android.content.Context context,
java.lang.String host)
readBoneDebugServer(Context)context - 上下文host - ip 地址public static java.lang.String readBoneDebugServer(android.content.Context context)
saveBoneDebugServer(Context, String)context - 上下文public static void savetPluginEnv(android.content.Context context,
java.lang.String env)
readPluginEnv(Context, String)context - 上下文env - BoneMobile 环境public static java.lang.String readPluginEnv(android.content.Context context,
java.lang.String defaultValue)
savetPluginEnv(Context, String)context - 上下文