rename
This commit is contained in:
parent
344ba18df8
commit
cfffcf1a61
@ -4,7 +4,7 @@ import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.github.pengfeizhou.hego.HegoContext;
|
||||
import com.github.pengfeizhou.hego.HegoUtils;
|
||||
import com.github.pengfeizhou.hego.utils.HegoUtils;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@ -13,6 +13,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
HegoContext hegoContext = HegoContext.createContext(HegoUtils.readAssetFile("demo.js"), "demo");
|
||||
hegoContext.callJS("log");
|
||||
hegoContext.callEntity("log");
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import android.app.Application;
|
||||
import com.github.pengfeizhou.hego.Hego;
|
||||
|
||||
/**
|
||||
* @Description: Android
|
||||
* @Description: Hego
|
||||
* @Author: pengfei.zhou
|
||||
* @CreateDate: 2019-07-18
|
||||
*/
|
||||
|
@ -6,7 +6,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* @Description: Android
|
||||
* @Description: Hego
|
||||
* @Author: pengfei.zhou
|
||||
* @CreateDate: 2019-07-18
|
||||
*/
|
||||
|
@ -3,7 +3,7 @@ package com.github.pengfeizhou.hego;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/**
|
||||
* @Description: Android
|
||||
* @Description: Hego
|
||||
* @Author: pengfei.zhou
|
||||
* @CreateDate: 2019-07-18
|
||||
*/
|
||||
@ -21,7 +21,7 @@ public class HegoContext {
|
||||
return new HegoContext(contextId);
|
||||
}
|
||||
|
||||
public void callJS(String methodName, Object... args) {
|
||||
public void callEntity(String methodName, Object... args) {
|
||||
HegoDriver.getInstance().invokeContextMethod(mContextId, methodName, args);
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
package com.github.pengfeizhou.hego;
|
||||
|
||||
import com.github.pengfeizhou.hego.engine.HegoJSEngine;
|
||||
import com.github.pengfeizhou.hego.utils.HegoSettableFuture;
|
||||
import com.github.pengfeizhou.jscore.JSDecoder;
|
||||
|
||||
/**
|
||||
* @Description: Android
|
||||
* @Description: Hego
|
||||
* @Author: pengfei.zhou
|
||||
* @CreateDate: 2019-07-18
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.github.pengfeizhou.hego;
|
||||
package com.github.pengfeizhou.hego.engine;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
@ -6,9 +6,11 @@ import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.github.pengfeizhou.hego.jse.HegoJSExecutor;
|
||||
import com.github.pengfeizhou.hego.jse.IHegoJSE;
|
||||
import com.github.pengfeizhou.jscore.ArchiveException;
|
||||
import com.github.pengfeizhou.hego.Hego;
|
||||
import com.github.pengfeizhou.hego.utils.HegoConstant;
|
||||
import com.github.pengfeizhou.hego.utils.HegoLog;
|
||||
import com.github.pengfeizhou.hego.utils.HegoSettableFuture;
|
||||
import com.github.pengfeizhou.hego.utils.HegoUtils;
|
||||
import com.github.pengfeizhou.jscore.JSDecoder;
|
||||
import com.github.pengfeizhou.jscore.JavaFunction;
|
||||
import com.github.pengfeizhou.jscore.JavaValue;
|
||||
@ -16,10 +18,9 @@ import com.github.pengfeizhou.jscore.JavaValue;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.FutureTask;
|
||||
|
||||
/**
|
||||
* @Description: Android
|
||||
* @Description: Hego
|
||||
* @Author: pengfei.zhou
|
||||
* @CreateDate: 2019-07-18
|
||||
*/
|
@ -1,4 +1,4 @@
|
||||
package com.github.pengfeizhou.hego.jse;
|
||||
package com.github.pengfeizhou.hego.engine;
|
||||
|
||||
import com.github.pengfeizhou.jscore.JSDecoder;
|
||||
import com.github.pengfeizhou.jscore.JSExecutor;
|
||||
@ -7,7 +7,7 @@ import com.github.pengfeizhou.jscore.JavaFunction;
|
||||
import com.github.pengfeizhou.jscore.JavaValue;
|
||||
|
||||
/**
|
||||
* @Description: Android
|
||||
* @Description: Hego
|
||||
* @Author: pengfei.zhou
|
||||
* @CreateDate: 2019-07-18
|
||||
*/
|
@ -1,4 +1,4 @@
|
||||
package com.github.pengfeizhou.hego.jse;
|
||||
package com.github.pengfeizhou.hego.engine;
|
||||
|
||||
import com.github.pengfeizhou.jscore.JSDecoder;
|
||||
import com.github.pengfeizhou.jscore.JSRuntimeException;
|
||||
@ -6,7 +6,7 @@ import com.github.pengfeizhou.jscore.JavaFunction;
|
||||
import com.github.pengfeizhou.jscore.JavaValue;
|
||||
|
||||
/**
|
||||
* @Description: Android
|
||||
* @Description: Hego
|
||||
* @Author: pengfei.zhou
|
||||
* @CreateDate: 2019-07-18
|
||||
*/
|
@ -1,7 +1,7 @@
|
||||
package com.github.pengfeizhou.hego;
|
||||
package com.github.pengfeizhou.hego.utils;
|
||||
|
||||
/**
|
||||
* @Description: Android
|
||||
* @Description: Hego
|
||||
* @Author: pengfei.zhou
|
||||
* @CreateDate: 2019-07-18
|
||||
*/
|
@ -1,9 +1,11 @@
|
||||
package com.github.pengfeizhou.hego;
|
||||
package com.github.pengfeizhou.hego.utils;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.github.pengfeizhou.hego.Hego;
|
||||
|
||||
/**
|
||||
* @Description: Android
|
||||
* @Description: Hego
|
||||
* @Author: pengfei.zhou
|
||||
* @CreateDate: 2019-07-18
|
||||
*/
|
@ -1,7 +1,7 @@
|
||||
package com.github.pengfeizhou.hego;
|
||||
package com.github.pengfeizhou.hego.utils;
|
||||
|
||||
/**
|
||||
* @Description: Android
|
||||
* @Description: Hego
|
||||
* @Author: pengfei.zhou
|
||||
* @CreateDate: 2019-07-18
|
||||
*/
|
@ -1,12 +1,14 @@
|
||||
package com.github.pengfeizhou.hego;
|
||||
package com.github.pengfeizhou.hego.utils;
|
||||
|
||||
import android.content.res.AssetManager;
|
||||
|
||||
import com.github.pengfeizhou.hego.Hego;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* @Description: Android
|
||||
* @Description: Hego
|
||||
* @Author: pengfei.zhou
|
||||
* @CreateDate: 2019-07-18
|
||||
*/
|
Reference in New Issue
Block a user