本文整理汇总了Java中com.taobao.weex.utils.WXSoInstallMgrSdk类的典型用法代码示例。如果您正苦于以下问题:Java WXSoInstallMgrSdk类的具体用法?Java WXSoInstallMgrSdk怎么用?Java WXSoInstallMgrSdk使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WXSoInstallMgrSdk类属于com.taobao.weex.utils包,在下文中一共展示了WXSoInstallMgrSdk类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: doInitInternal
import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入依赖的package包/类
private static void doInitInternal(final Application application,final InitConfig config){
WXEnvironment.sApplication = application;
WXEnvironment.JsFrameworkInit = false;
WXBridgeManager.getInstance().post(new Runnable() {
@Override
public void run() {
long start = System.currentTimeMillis();
WXSDKManager sm = WXSDKManager.getInstance();
if(config != null ) {
sm.setIWXHttpAdapter(config.getHttpAdapter());
sm.setIWXImgLoaderAdapter(config.getImgAdapter());
sm.setIWXUserTrackAdapter(config.getUtAdapter());
sm.setIWXDebugAdapter(config.getDebugAdapter());
sm.setIWXStorageAdapter(config.getStorageAdapter());
if(config.getDebugAdapter()!=null){
config.getDebugAdapter().initDebug(application);
}
}
WXSoInstallMgrSdk.init(application);
boolean isSoInitSuccess = WXSoInstallMgrSdk.initSo(V8_SO_NAME, 1, config!=null?config.getUtAdapter():null);
if (!isSoInitSuccess) {
return;
}
sm.initScriptsFramework(config!=null?config.getFramework():null);
WXEnvironment.sSDKInitExecuteTime = System.currentTimeMillis() - start;
WXLogUtils.renderPerformanceLog("SDKInitExecuteTime", WXEnvironment.sSDKInitExecuteTime);
}
});
register();
}
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:33,代码来源:WXSDKEngine.java
示例5: setup
import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入依赖的package包/类
@Before
public void setup() throws Exception {
mockStatic(WXSoInstallMgrSdk.class);
when(WXSoInstallMgrSdk.initSo("weexv8", 1, null)).thenReturn(true);
WXSDKEngine.initialize(RuntimeEnvironment.application,new InitConfig.Builder().build());
mInstance = createInstance();
WXBridgeManagerTest.getLooper().idle();
mockStatic(WXFileUtils.class);
when(WXFileUtils.loadAsset(null,null)).thenReturn("{}");
}
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:12,代码来源:WXSDKInstanceTest.java
示例6: setUp
import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
PowerMockito.mockStatic(WXSoInstallMgrSdk.class);
PowerMockito.mockStatic(TextUtils.class);
PowerMockito.mockStatic(WXComponentFactory.class);
PowerMockito.when(TextUtils.isEmpty("124")).thenReturn(true);
PowerMockito.when(WXSoInstallMgrSdk.initSo(null, 1, null)).thenReturn(true);
WXSDKInstance instance = Mockito.mock(WXSDKInstance.class);
mWXRenderStatement = new WXRenderStatement(instance);
}
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:11,代码来源:WXRenderStatementTest.java
示例7: doInitInternal
import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入依赖的package包/类
private static void doInitInternal(final Application application,final InitConfig config){
WXEnvironment.sApplication = application;
WXEnvironment.JsFrameworkInit = false;
WXBridgeManager.getInstance().post(new Runnable() {
@Override
public void run() {
long start = System.currentTimeMillis();
WXSDKManager sm = WXSDKManager.getInstance();
sm.onSDKEngineInitialize();
if(config != null ) {
sm.setInitConfig(config);
if(config.getDebugAdapter()!=null){
config.getDebugAdapter().initDebug(application);
}
}
WXSoInstallMgrSdk.init(application,
sm.getIWXSoLoaderAdapter(),
sm.getWXStatisticsListener());
boolean isSoInitSuccess = WXSoInstallMgrSdk.initSo(V8_SO_NAME, 1, config!=null?config.getUtAdapter():null);
if (!isSoInitSuccess) {
return;
}
sm.initScriptsFramework(config!=null?config.getFramework():null);
WXEnvironment.sSDKInitExecuteTime = System.currentTimeMillis() - start;
WXLogUtils.renderPerformanceLog("SDKInitExecuteTime", WXEnvironment.sSDKInitExecuteTime);
}
});
register();
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:32,代码来源:WXSDKEngine.java
示例8: setUp
import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
PowerMockito.mockStatic(WXSoInstallMgrSdk.class);
PowerMockito.mockStatic(TextUtils.class);
PowerMockito.mockStatic(WXComponentFactory.class);
PowerMockito.when(TextUtils.isEmpty("124")).thenReturn(true);
PowerMockito.when(WXSoInstallMgrSdk.initSo(null, 1, null)).thenReturn(true);
WXSDKInstance instance = Mockito.mock(WXSDKInstance.class);
mWXRenderStatement = new RenderActionContextImpl(instance);
}
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:11,代码来源:WXRenderStatementTest.java
示例9: 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
示例10: doInitInternal
import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入依赖的package包/类
private static void doInitInternal(final Application application,final InitConfig config){
WXEnvironment.sApplication = application;
WXEnvironment.JsFrameworkInit = false;
WXBridgeManager.getInstance().post(new Runnable() {
@Override
public void run() {
long start = System.currentTimeMillis();
WXSDKManager sm = WXSDKManager.getInstance();
if(config != null ) {
sm.setInitConfig(config);
if(config.getDebugAdapter()!=null){
config.getDebugAdapter().initDebug(application);
}
}
WXSoInstallMgrSdk.init(application);
boolean isSoInitSuccess = WXSoInstallMgrSdk.initSo(V8_SO_NAME, 1, config!=null?config.getUtAdapter():null);
if (!isSoInitSuccess) {
return;
}
sm.initScriptsFramework(config!=null?config.getFramework():null);
WXEnvironment.sSDKInitExecuteTime = System.currentTimeMillis() - start;
WXLogUtils.renderPerformanceLog("SDKInitExecuteTime", WXEnvironment.sSDKInitExecuteTime);
}
});
register();
}
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:29,代码来源:WXSDKEngine.java
示例11: doInitInternal
import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入依赖的package包/类
private static void doInitInternal(final Application application,final InitConfig config){
WXEnvironment.sApplication = application;
WXEnvironment.JsFrameworkInit = false;
WXBridgeManager.getInstance().getJSHandler().post(new Runnable() {
@Override
public void run() {
long start = System.currentTimeMillis();
WXSDKManager sm = WXSDKManager.getInstance();
if(config != null ) {
sm.setIWXHttpAdapter(config.getHttpAdapter());
sm.setIWXImgLoaderAdapter(config.getImgAdapter());
sm.setIWXUserTrackAdapter(config.getUtAdapter());
sm.setIWXDebugAdapter(config.getDebugAdapter());
if(config.getDebugAdapter()!=null){
config.getDebugAdapter().initDebug(application);
}
}
WXSoInstallMgrSdk.init(application);
boolean isSoInitSuccess = WXSoInstallMgrSdk.initSo(V8_SO_NAME, 1, config!=null?config.getUtAdapter():null);
if (!isSoInitSuccess) {
return;
}
sm.initScriptsFramework(null);
WXEnvironment.sSDKInitExecuteTime = System.currentTimeMillis() - start;
WXLogUtils.renderPerformanceLog("SDKInitInvokeTime", WXEnvironment.sSDKInitInvokeTime);
WXLogUtils.renderPerformanceLog("SDKInitExecuteTime", WXEnvironment.sSDKInitExecuteTime);
}
});
register();
}
开发者ID:Laisly,项目名称:weex,代码行数:33,代码来源:WXSDKEngine.java
示例12: setUp
import com.taobao.weex.utils.WXSoInstallMgrSdk; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
PowerMockito.mockStatic(WXSoInstallMgrSdk.class);
PowerMockito.mockStatic(TextUtils.class);
PowerMockito.mockStatic(WXComponentFactory.class);
PowerMockito.when(TextUtils.isEmpty("124")).thenReturn(true);
PowerMockito.when(WXSoInstallMgrSdk.initSo(null, 1, null)).thenReturn(true);
// WXSDKEngine.init(RuntimeEnvironment.application);
WXSDKInstance instance = Mockito.mock(WXSDKInstance.class);
mWXRenderStatement = new WXRenderStatement(instance, "123");
}
开发者ID:Laisly,项目名称:weex,代码行数:12,代码来源:WXRenderStatementTest.java
示例13: 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
示例14: 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
示例15: 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
示例16: 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
示例17: 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类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论