android.content.Intent.getSelector()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(306)

本文整理了Java中android.content.Intent.getSelector()方法的一些代码示例,展示了Intent.getSelector()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Intent.getSelector()方法的具体详情如下:
包路径:android.content.Intent
类名称:Intent
方法名:getSelector

Intent.getSelector介绍

暂无

代码示例

代码示例来源:origin: robolectric/robolectric

private static ComponentName getComponentForIntent(Intent intent) {
 ComponentName component = intent.getComponent();
 if (component == null) {
  if (intent.getSelector() != null) {
   intent = intent.getSelector();
   component = intent.getComponent();
  }
 }
 return component;
}

代码示例来源:origin: android-hacker/VirtualXposed

if (comp == null) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
    if (intent.getSelector() != null) {
      intent = intent.getSelector();
      comp = intent.getComponent();

代码示例来源:origin: android-hacker/VirtualXposed

if (comp == null) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
    if (intent.getSelector() != null) {
      intent = intent.getSelector();
      comp = intent.getComponent();

代码示例来源:origin: android-hacker/VirtualXposed

if (comp == null) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
    if (intent.getSelector() != null) {
      intent = intent.getSelector();
      comp = intent.getComponent();

代码示例来源:origin: android-hacker/VirtualXposed

if (comp == null) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
    if (intent.getSelector() != null) {
      intent = intent.getSelector();
      comp = intent.getComponent();

代码示例来源:origin: elvishew/xLog

Intent mSelector = intent.getSelector();
if (mSelector != null) {
 b.append(" sel=");

代码示例来源:origin: org.robolectric/shadows-framework

private static ComponentName getComponentForIntent(Intent intent) {
 ComponentName component = intent.getComponent();
 if (component == null) {
  if (intent.getSelector() != null) {
   intent = intent.getSelector();
   component = intent.getComponent();
  }
 }
 return component;
}

代码示例来源:origin: andriydruk/BonjourBrowser

@Override
  public boolean shouldOverrideUrlLoading(WebView view, String url) {
    Intent intent;
    // Perform generic parsing of the URI to turn it into an Intent.
    try {
      intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
    } catch (URISyntaxException ex) {
      Log.w(TAG, "Bad URI " + url + ": " + ex.getMessage());
      Toast.makeText(HTMLViewerActivity.this, R.string.cannot_open_link, Toast.LENGTH_SHORT).show();
      return true;
    }
    // Sanitize the Intent, ensuring web pages can not bypass browser
    // security (only access to BROWSABLE activities).
    intent.addCategory(Intent.CATEGORY_BROWSABLE);
    intent.setComponent(null);
    Intent selector = intent.getSelector();
    if (selector != null) {
      selector.addCategory(Intent.CATEGORY_BROWSABLE);
      selector.setComponent(null);
    }
    try {
      view.getContext().startActivity(intent);
    } catch (ActivityNotFoundException ex) {
      Log.w(TAG, "No application can handle " + url);
      Toast.makeText(HTMLViewerActivity.this, R.string.cannot_open_link, Toast.LENGTH_SHORT).show();
    }
    return true;
  }
}

代码示例来源:origin: JustinRoom/JSCKit

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
  String action = intent.getAction();
  if (ACTION_INIT.equals(action)) {
  } else if (ACTION_SCREEN_RECORD.equals(action)){
  } else if (ACTION_SCREEN_SHOT.equals(action)){
    resultCode = intent.getIntExtra("result_code", 0);
    data = intent.getSelector();
    setUpMediaProjection(resultCode, data);
    startScreenCapture();
    screenshot();
    stopScreenCapture();
  }
  return START_STICKY;
}

代码示例来源:origin: Blankj/ALog

Intent mSelector = intent.getSelector();
if (mSelector != null) {
  if (!first) {

代码示例来源:origin: bzsome/VirtualApp-x326

if (comp == null) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
    if (intent.getSelector() != null) {
      intent = intent.getSelector();
      comp = intent.getComponent();

代码示例来源:origin: bzsome/VirtualApp-x326

if (comp == null) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
    if (intent.getSelector() != null) {
      intent = intent.getSelector();
      comp = intent.getComponent();

代码示例来源:origin: darkskygit/VirtualApp

if (comp == null) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
    if (intent.getSelector() != null) {
      intent = intent.getSelector();
      comp = intent.getComponent();

代码示例来源:origin: darkskygit/VirtualApp

if (comp == null) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
    if (intent.getSelector() != null) {
      intent = intent.getSelector();
      comp = intent.getComponent();

代码示例来源:origin: darkskygit/VirtualApp

if (comp == null) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
    if (intent.getSelector() != null) {
      intent = intent.getSelector();
      comp = intent.getComponent();

代码示例来源:origin: bzsome/VirtualApp-x326

if (comp == null) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
    if (intent.getSelector() != null) {
      intent = intent.getSelector();
      comp = intent.getComponent();

代码示例来源:origin: darkskygit/VirtualApp

if (comp == null) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
    if (intent.getSelector() != null) {
      intent = intent.getSelector();
      comp = intent.getComponent();

代码示例来源:origin: bzsome/VirtualApp-x326

if (comp == null) {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
    if (intent.getSelector() != null) {
      intent = intent.getSelector();
      comp = intent.getComponent();

代码示例来源:origin: derry/delion

Intent selector = intent.getSelector();
if (selector != null) {
  selector.addCategory(Intent.CATEGORY_BROWSABLE);

相关文章

Intent类方法