思特奇智慧酒店云平台 v0.0.5版本的 MD5 值为:dedb172bb322639d79d7e0e26262fb5c

以下内容为反编译后的 NetworkActivity.java 源代码,内容仅作参考


package com.sitech.oncon.weex;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import androidx.appcompat.app.AppCompatActivity;
import com.sitech.oncon.R;
import com.taobao.weex.IWXRenderListener;
import com.taobao.weex.WXSDKInstance;
import com.taobao.weex.common.WXRenderStrategy;
import java.util.HashMap;
public class NetworkActivity extends AppCompatActivity implements IWXRenderListener {
    public static String TEST_URL = "http://dotwe.org/raw/dist/6fe11640e8d25f2f98176e9643c08687.bundle.js";
    public FrameLayout mContainer;
    public WXSDKInstance mWXSDKInstance;
    public String url;

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.weex_activity_network);
        this.mContainer = (FrameLayout) findViewById(R.id.container);
        if (getIntent().hasExtra("url")) {
            this.url = getIntent().getStringExtra("url");
        } else if (getIntent().getData() != null) {
            this.url = getIntent().getData().toString();
        } else {
            this.url = "";
        }
        this.mWXSDKInstance = new WXSDKInstance(this);
        this.mWXSDKInstance.registerRenderListener(this);
        if (!TextUtils.isEmpty(this.url)) {
            HashMap hashMap = new HashMap();
            hashMap.put("bundleUrl", this.url);
            this.mWXSDKInstance.renderByUrl("WXSample", this.url, hashMap, null, WXRenderStrategy.APPEND_ONCE);
            return;
        }
        HashMap hashMap2 = new HashMap();
        hashMap2.put("bundleUrl", TEST_URL);
        this.mWXSDKInstance.renderByUrl("WXSample", TEST_URL, hashMap2, null, WXRenderStrategy.APPEND_ONCE);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        WXSDKInstance wXSDKInstance = this.mWXSDKInstance;
        if (wXSDKInstance != null) {
            wXSDKInstance.onActivityDestroy();
        }
    }

    @Override
    public void onException(WXSDKInstance wXSDKInstance, String str, String str2) {
    }

    @Override
    public void onPause() {
        super.onPause();
        WXSDKInstance wXSDKInstance = this.mWXSDKInstance;
        if (wXSDKInstance != null) {
            wXSDKInstance.onActivityPause();
        }
    }

    @Override
    public void onRefreshSuccess(WXSDKInstance wXSDKInstance, int i, int i2) {
    }

    @Override
    public void onRenderSuccess(WXSDKInstance wXSDKInstance, int i, int i2) {
    }

    @Override
    public void onResume() {
        super.onResume();
        WXSDKInstance wXSDKInstance = this.mWXSDKInstance;
        if (wXSDKInstance != null) {
            wXSDKInstance.onActivityResume();
        }
    }

    @Override
    public void onStart() {
        super.onStart();
        WXSDKInstance wXSDKInstance = this.mWXSDKInstance;
        if (wXSDKInstance != null) {
            wXSDKInstance.onActivityStart();
        }
    }

    @Override
    public void onStop() {
        super.onStop();
        WXSDKInstance wXSDKInstance = this.mWXSDKInstance;
        if (wXSDKInstance != null) {
            wXSDKInstance.onActivityStop();
        }
    }

    @Override
    public void onViewCreated(WXSDKInstance wXSDKInstance, View view) {
        if (view.getParent() != null) {
            ((ViewGroup) view.getParent()).removeView(view);
        }
        this.mContainer.addView(view);
    }
}