dev android,and complete load context
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
package="com.github.pengfeizhou.hegodemo">
|
||||
|
||||
<application
|
||||
android:name=".MyApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
|
@@ -3,7 +3,8 @@ package com.github.pengfeizhou.hegodemo;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.github.pengfeizhou.hegodemo.R;
|
||||
import com.github.pengfeizhou.hego.HegoContext;
|
||||
import com.github.pengfeizhou.hego.HegoUtils;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@@ -11,5 +12,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
HegoContext hegoContext = HegoContext.createContext(HegoUtils.readAssetFile("test.js"), "demo");
|
||||
hegoContext.callJS("");
|
||||
}
|
||||
}
|
||||
|
@@ -2,10 +2,17 @@ package com.github.pengfeizhou.hegodemo;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import com.github.pengfeizhou.hego.Hego;
|
||||
|
||||
/**
|
||||
* @Description: Android
|
||||
* @Author: pengfei.zhou
|
||||
* @CreateDate: 2019-07-18
|
||||
*/
|
||||
public class MyApplication extends Application {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
Hego.init(this);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user