Search in sources :

Example 1 with BingoWXHttpAdapter

use of com.litingzhe.justandroid.someOther.weex.weexAdapter.BingoWXHttpAdapter in project JustAndroid by chinaltz.

the class MyApplication method initWeexConfig.

private void initWeexConfig() {
    WXSDKEngine.initialize(this, new InitConfig.Builder().setHttpAdapter(new BingoWXHttpAdapter()).setImgAdapter(new ImageAdapter()).setDebugAdapter(new PlayDebugAdapter()).setJSExceptionAdapter(new JSExceptionAdapter()).build());
    try {
        WXSDKEngine.registerModule("myModule", WXEventModule.class);
    } catch (WXException e) {
        e.printStackTrace();
    }
    registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() {

        @Override
        public void onActivityCreated(Activity activity, Bundle bundle) {
        }

        @Override
        public void onActivityStarted(Activity activity) {
        }

        @Override
        public void onActivityResumed(Activity activity) {
        }

        @Override
        public void onActivityPaused(Activity activity) {
        }

        @Override
        public void onActivityStopped(Activity activity) {
        }

        @Override
        public void onActivitySaveInstanceState(Activity activity, Bundle bundle) {
        }

        @Override
        public void onActivityDestroyed(Activity activity) {
            // The demo code of calling 'notifyTrimMemory()'
            if (false) {
                // We assume that the application is on an idle time.
                WXSDKManager.getInstance().notifyTrimMemory();
            }
        }
    });
}
Also used : BingoWXHttpAdapter(com.litingzhe.justandroid.someOther.weex.weexAdapter.BingoWXHttpAdapter) JSExceptionAdapter(com.litingzhe.justandroid.someOther.weex.weexAdapter.JSExceptionAdapter) ImageAdapter(com.litingzhe.justandroid.someOther.weex.weexAdapter.ImageAdapter) Bundle(android.os.Bundle) WXException(com.taobao.weex.common.WXException) Activity(android.app.Activity) PlayDebugAdapter(com.litingzhe.justandroid.someOther.weex.weexAdapter.PlayDebugAdapter)

Aggregations

Activity (android.app.Activity)1 Bundle (android.os.Bundle)1 BingoWXHttpAdapter (com.litingzhe.justandroid.someOther.weex.weexAdapter.BingoWXHttpAdapter)1 ImageAdapter (com.litingzhe.justandroid.someOther.weex.weexAdapter.ImageAdapter)1 JSExceptionAdapter (com.litingzhe.justandroid.someOther.weex.weexAdapter.JSExceptionAdapter)1 PlayDebugAdapter (com.litingzhe.justandroid.someOther.weex.weexAdapter.PlayDebugAdapter)1 WXException (com.taobao.weex.common.WXException)1