use of com.taobao.weex.common.WXException in project weex-example by KalicyZhou.
the class WXApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
// initDebugEnvironment(true, false, "DEBUG_SERVER_HOST");
// WXSDKEngine.addCustomOptions("appName", "WXSample");
// WXSDKEngine.addCustomOptions("appGroup", "WXApp");
WXSDKEngine.initialize(this, new InitConfig.Builder().setImgAdapter(new ImageAdapter()).setURIAdapter(new CustomURIAdapter()).build());
try {
WXSDKEngine.registerModule("event", WXEventModule.class);
WXSDKEngine.registerModule("service", WXServiceModule.class);
} catch (WXException e) {
e.printStackTrace();
}
Fresco.initialize(this);
AppConfig.init(this);
PluginManager.init(this);
}
use of com.taobao.weex.common.WXException 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();
}
}
});
}
Aggregations