当前位置: 首页>>代码示例>>Java>>正文


Java WXSoInstallMgrSdk.isCPUSupport方法代码示例

本文整理汇总了Java中com.taobao.weex.utils.WXSoInstallMgrSdk.isCPUSupport方法的典型用法代码示例。如果您正苦于以下问题:Java WXSoInstallMgrSdk.isCPUSupport方法的具体用法?Java WXSoInstallMgrSdk.isCPUSupport怎么用?Java WXSoInstallMgrSdk.isCPUSupport使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.taobao.weex.utils.WXSoInstallMgrSdk的用法示例。


在下文中一共展示了WXSoInstallMgrSdk.isCPUSupport方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_index);
    setContainer((ViewGroup) findViewById(R.id.index_container));
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

    mProgressBar = (ProgressBar) findViewById(R.id.index_progressBar);
    mTipView = (TextView) findViewById(R.id.index_tip);
    mProgressBar.setVisibility(View.VISIBLE);
    mTipView.setVisibility(View.VISIBLE);


    if (!WXSoInstallMgrSdk.isCPUSupport()) {
        mProgressBar.setVisibility(View.INVISIBLE);
        mTipView.setText(R.string.cpu_not_support_tip);
        return;
    }

    loadUrl(isLocalPage() ? AppConfig.getLocalUrl() : AppConfig.getLaunchUrl());
}
 
开发者ID:dodola,项目名称:WeexOne,代码行数:23,代码来源:IndexActivity.java

示例2: onCreate

import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_wxpage);
  mContainer = (ViewGroup) findViewById(R.id.container);
  mProgressBar = (ProgressBar) findViewById(R.id.progress);
  mTipView = (TextView) findViewById(R.id.index_tip);

  Uri uri = getIntent().getData();
  Bundle bundle = getIntent().getExtras();

  if (uri != null) {
    mUri = uri;
  }

  if (bundle != null) {
    String bundleUrl = bundle.getString(Constants.PARAM_BUNDLE_URL);
    if (!TextUtils.isEmpty(bundleUrl)) {
      mUri = Uri.parse(bundleUrl);
    }
  }

  if (mUri == null) {
    Toast.makeText(this, "the uri is empty!", Toast.LENGTH_SHORT).show();
    finish();
    return;
  }


  if (!WXSoInstallMgrSdk.isCPUSupport()) {
    mProgressBar.setVisibility(View.INVISIBLE);
    mTipView.setText(R.string.cpu_not_support_tip);
    return;
  }

  loadUrl(getUrl(mUri));
}
 
开发者ID:natjs,项目名称:nat-explorer,代码行数:38,代码来源:WXPageActivity.java

示例3: isSupport

import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入方法依赖的package包/类
public static boolean isSupport() {
  boolean excludeX86 = "true".equals(options.get(SETTING_EXCLUDE_X86SUPPORT));
  boolean isX86AndExcluded = WXSoInstallMgrSdk.isX86()&&excludeX86;
  boolean isCPUSupport = WXSoInstallMgrSdk.isCPUSupport()&&!isX86AndExcluded;
  if (WXEnvironment.isApkDebugable()) {
    WXLogUtils.d("WXEnvironment.sSupport:" + isCPUSupport
                 + " WXSDKEngine.isInitialized():" + WXSDKEngine.isInitialized()
                 + " !WXUtils.isTabletDevice():" + !WXUtils.isTabletDevice());
  }
  return isCPUSupport && WXSDKEngine.isInitialized() && !WXUtils.isTabletDevice();
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:12,代码来源:WXEnvironment.java

示例4: isHardwareSupport

import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入方法依赖的package包/类
/**
 * Tell whether Weex can run on current hardware.
 * @return true if weex can run on current hardware, otherwise false.
 */
public static boolean isHardwareSupport() {
  boolean excludeX86 = "true".equals(options.get(SETTING_EXCLUDE_X86SUPPORT));
  boolean isX86AndExcluded = WXSoInstallMgrSdk.isX86() && excludeX86;
  boolean isCPUSupport = WXSoInstallMgrSdk.isCPUSupport() && !isX86AndExcluded;
  if (WXEnvironment.isApkDebugable()) {
    WXLogUtils.d("WXEnvironment.sSupport:" + isCPUSupport
                 + "isX86AndExclueded: "+ isX86AndExcluded
                 + " !WXUtils.isTabletDevice():" + !WXUtils.isTabletDevice());
  }
  return isCPUSupport && !WXUtils.isTabletDevice();
}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:16,代码来源:WXEnvironment.java

示例5: onCreate

import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_index);
  setContainer((ViewGroup) findViewById(R.id.index_container));
  Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
  toolbar.setTitle("WEEX");
  setSupportActionBar(toolbar);

  mProgressBar = (ProgressBar) findViewById(R.id.index_progressBar);
  mTipView = (TextView) findViewById(R.id.index_tip);
  mProgressBar.setVisibility(View.VISIBLE);
  mTipView.setVisibility(View.VISIBLE);


  if(!WXSoInstallMgrSdk.isCPUSupport()){
    mProgressBar.setVisibility(View.INVISIBLE);
    mTipView.setText(R.string.cpu_not_support_tip);
    return;
  }

  if(TextUtils.equals(CURRENT_IP,DEFAULT_IP)){
    renderPage(WXFileUtils.loadFileContent("index.js", this),WEEX_INDEX_URL);
  }else{
    renderPageByURL(WEEX_INDEX_URL);
  }
}
 
开发者ID:Laisly,项目名称:weex,代码行数:28,代码来源:IndexActivity.java

示例6: onCreate

import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_wxpage);
  mContainer = (ViewGroup) findViewById(R.id.container);
  mProgressBar = (ProgressBar) findViewById(R.id.progress);
  mTipView = (TextView) findViewById(R.id.index_tip);

  if (mIsDevSupportEnabled && !CommonUtils.hasHardwareMenuKey()) {
    mShakeDetector = new ShakeDetector(new ShakeDetector.ShakeListener() {

      @Override
      public void onShake() {
        showDevOptionsDialog();
      }
    });
  }

  Uri uri = getIntent().getData();
  Bundle bundle = getIntent().getExtras();

  if (uri != null) {
    mUri = uri;
  }

  if (bundle != null) {
    String bundleUrl = bundle.getString(Constants.PARAM_BUNDLE_URL);
    if (!TextUtils.isEmpty(bundleUrl)) {
      mUri = Uri.parse(bundleUrl);
    }
  }

  if (mUri == null) {
    Toast.makeText(this, "the uri is empty!", Toast.LENGTH_SHORT).show();
    finish();
    return;
  }


  if (!WXSoInstallMgrSdk.isCPUSupport()) {
    mProgressBar.setVisibility(View.INVISIBLE);
    mTipView.setText(R.string.cpu_not_support_tip);
    return;
  }

  loadUrl(getUrl(mUri));
}
 
开发者ID:wangwei123,项目名称:my-weex,代码行数:48,代码来源:WXPageActivity.java

示例7: onCreate

import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_wxpage);
  mContainer = (ViewGroup) findViewById(R.id.container);
  mProgressBar = (ProgressBar) findViewById(R.id.progress);
  mTipView = (TextView) findViewById(R.id.index_tip);

  if (mIsDevSupportEnabled && !CommonUtils.hasHardwareMenuKey()) {
    mShakeDetector = new ShakeDetector(new ShakeDetector.ShakeListener() {

      @Override
      public void onShake() {
        showDevOptionsDialog();
      }
    });
  }

  Uri uri = getIntent().getData();
  Bundle bundle = getIntent().getExtras();

  if (uri != null) {
    mUri = uri;
  }

  if (bundle != null) {
    String bundleUrl = bundle.getString(Constants.PARAM_BUNDLE_URL);
    if (!TextUtils.isEmpty(bundleUrl)) {
      mUri = Uri.parse(bundleUrl);
    }
  }

  if (mUri == null) {
    Toast.makeText(this, "the uri is empty!", Toast.LENGTH_SHORT).show();
    finish();
    return;
  }


  if (!WXSoInstallMgrSdk.isCPUSupport()) {
    mProgressBar.setVisibility(View.INVISIBLE);
    mTipView.setText(R.string.cpu_not_support_tip);
    return;
  }
  Log.e("tag","=========murl: "+mUri.toString());
  loadUrl(getUrl(mUri));
}
 
开发者ID:coderminer,项目名称:GankIO_weex,代码行数:48,代码来源:WXPageActivity.java

示例8: onCreate

import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_index);
  setContainer((ViewGroup) findViewById(R.id.index_container));
  Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
  toolbar.setTitle("WEEX");
  setSupportActionBar(toolbar);

  mProgressBar = (ProgressBar) findViewById(R.id.index_progressBar);
  mTipView = (TextView) findViewById(R.id.index_tip);
  mProgressBar.setVisibility(View.VISIBLE);
  mTipView.setVisibility(View.VISIBLE);


  if(!WXSoInstallMgrSdk.isCPUSupport()){
    mProgressBar.setVisibility(View.INVISIBLE);
    mTipView.setText(R.string.cpu_not_support_tip);
    return;
  }

  if(TextUtils.equals(CURRENT_IP,DEFAULT_IP)){
    renderPage(WXFileUtils.loadAsset("index.js", this),WEEX_INDEX_URL);
  }else{
    renderPageByURL(WEEX_INDEX_URL);
  }


  mReloadReceiver=new BroadcastReceiver() {
    @Override
    public void onReceive(Context context, Intent intent) {
      createWeexInstance();
      if(TextUtils.equals(CURRENT_IP,DEFAULT_IP)){
        renderPage(WXFileUtils.loadAsset("index.js", IndexActivity.this),WEEX_INDEX_URL);
      }else{
        renderPageByURL(WEEX_INDEX_URL);
      }
      mProgressBar.setVisibility(View.VISIBLE);
    }
  };

  LocalBroadcastManager.getInstance(this).registerReceiver(mReloadReceiver,new IntentFilter(WXSDKEngine.JS_FRAMEWORK_RELOAD));
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:44,代码来源:IndexActivity.java

示例9: onCreate

import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_wxpage);
  mContainer = (ViewGroup) findViewById(R.id.container);
  mProgressBar = (ProgressBar) findViewById(R.id.progress);
  mTipView = (TextView) findViewById(R.id.index_tip);

  Intent intent = getIntent();
  Uri uri = intent.getData();
  String from = intent.getStringExtra("from");
  mFromSplash = "splash".equals(from);

  if (uri == null) {
    uri = Uri.parse("{}");
  }
  if (uri != null) {
    try {
      JSONObject initData = new JSONObject(uri.toString());
      String bundleUrl = initData.optString("WeexBundle", null);
      if (bundleUrl != null) {
        mUri = Uri.parse(bundleUrl);
      }

      String ws = initData.optString("Ws", null);
      if (!TextUtils.isEmpty(ws)) {
        mHotReloadManager = new HotReloadManager(ws, new HotReloadManager.ActionListener() {
          @Override
          public void reload() {
            runOnUiThread(new Runnable() {
              @Override
              public void run() {
                Toast.makeText(WXPageActivity.this, "Hot reload", Toast.LENGTH_SHORT).show();
                createWeexInstance();
                renderPage();
              }
            });
          }

          @Override
          public void render(final String bundleUrl) {
            runOnUiThread(new Runnable() {
              @Override
              public void run() {
                Toast.makeText(WXPageActivity.this, "Render: " + bundleUrl, Toast.LENGTH_SHORT).show();
                createWeexInstance();
                loadUrl(bundleUrl);
              }
            });
          }
        });
      } else {
        WXLogUtils.w("Weex", "can not get hot reload config");
      }
    } catch (JSONException e) {
      e.printStackTrace();
    }
  }

  if (mUri == null) {
    mUri = Uri.parse(AppConfig.getLaunchUrl());
  }

  if (!WXSoInstallMgrSdk.isCPUSupport()) {
    mProgressBar.setVisibility(View.INVISIBLE);
    mTipView.setText(R.string.cpu_not_support_tip);
    return;
  }

  String url = getUrl(mUri);
  if (getSupportActionBar() != null) {
    getSupportActionBar().setTitle(url);
  }
  loadUrl(url);
}
 
开发者ID:weexteam,项目名称:weexpack-android,代码行数:76,代码来源:WXPageActivity.java


注:本文中的com.taobao.weex.utils.WXSoInstallMgrSdk.isCPUSupport方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。