本文整理汇总了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());
}
示例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));
}
示例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();
}
示例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();
}
示例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);
}
}
示例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));
}
示例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));
}
示例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));
}
示例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);
}