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

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

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

Intent.resolveTypeIfNeeded介绍

暂无

代码示例

代码示例来源:origin: Marswin/MarsDaemon

mBroadcastData.writeString(intent.resolveTypeIfNeeded(context.getContentResolver()));
mBroadcastData.writeStrongBinder(null);
mBroadcastData.writeInt(Activity.RESULT_OK);

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

Reflect.on(VClientImpl.get().getCurrentApplication().getPackageManager()).call("setLastChosenActivity",
    intent,
    intent.resolveTypeIfNeeded(getContentResolver()),
    PackageManager.MATCH_DEFAULT_ONLY,
    filter, bestMatch, intent.getComponent());

代码示例来源:origin: stackoverflow.com

@Override
 public ResolveInfo resolveActivity(Intent intent, int flags) {
   try {
     return mPM.resolveIntent(
       intent,
       intent.resolveTypeIfNeeded(mContext.getContentResolver()),
       flags);
   } catch (RemoteException e) {
     throw new RuntimeException("Package manager has died", e);
   }
 }

代码示例来源:origin: stackoverflow.com

int result = ActivityManagerNative.getDefault()
  .startActivity(whoThread, intent,
      intent.resolveTypeIfNeeded(who.getContentResolver()),
      null, 0, token, target != null ? target.mEmbeddedID : null,
      requestCode, false, false);

代码示例来源:origin: stackoverflow.com

public static PendingIntent getActivity(Context context, int requestCode,
    Intent intent, int flags) {
  String packageName = context.getPackageName();
  String resolvedType = intent != null ? intent.resolveTypeIfNeeded(
      context.getContentResolver()) : null;
  try {
    intent.setAllowFds(false);
    IIntentSender target =
      ActivityManagerNative.getDefault().getIntentSender(
        IActivityManager.INTENT_SENDER_ACTIVITY, packageName,
        null, null, requestCode, new Intent[] { intent },
        resolvedType != null ? new String[] { resolvedType } : null, flags);
    return target != null ? new PendingIntent(target) : null;
  } catch (RemoteException e) {
  }
  return null;
}

代码示例来源:origin: stackoverflow.com

1431            int res = ActivityManagerNative.getDefault().bindService(
1432                mMainThread.getApplicationThread(), getActivityToken(),
1433                service, service.resolveTypeIfNeeded(getContentResolver()),
1434                sd, flags, userHandle);
1435            if (res < 0) {

代码示例来源:origin: stackoverflow.com

intent.resolveTypeIfNeeded(mAppContext.getContentResolver()),
intent.getScheme(), intent.getData(),
intent.getCategories(), "LocalBroadcastManager");

代码示例来源:origin: xfmax/BasePedo

mBroadcastData.writeString(intent.resolveTypeIfNeeded(context.getContentResolver()));
mBroadcastData.writeStrongBinder(null);
mBroadcastData.writeInt(Activity.RESULT_OK);

代码示例来源:origin: stephen8341/KeepProcLive

mBroadcastData.writeString(intent.resolveTypeIfNeeded(context.getContentResolver()));
mBroadcastData.writeStrongBinder(null);
mBroadcastData.writeInt(Activity.RESULT_OK);

代码示例来源:origin: com.google.android/support-v4

synchronized (mReceivers) {
  final String action = intent.getAction();
  final String type = intent.resolveTypeIfNeeded(
      mAppContext.getContentResolver());
  final Uri data = intent.getData();

代码示例来源:origin: com.github.japgolly.android.test/robolectric

synchronized (mReceivers) {
  final String action = intent.getAction();
  final String type = intent.resolveTypeIfNeeded(
    mAppContext.getContentResolver());
  final Uri data = intent.getData();

代码示例来源:origin: kingargyle/adt-leanback-support

synchronized (mReceivers) {
  final String action = intent.getAction();
  final String type = intent.resolveTypeIfNeeded(
      mAppContext.getContentResolver());
  final Uri data = intent.getData();

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

Reflect.on(VClientImpl.get().getCurrentApplication().getPackageManager()).call("setLastChosenActivity",
    intent,
    intent.resolveTypeIfNeeded(getContentResolver()),
    PackageManager.MATCH_DEFAULT_ONLY,
    filter, bestMatch, intent.getComponent());

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

Reflect.on(VClientImpl.get().getCurrentApplication().getPackageManager()).call("setLastChosenActivity",
    intent,
    intent.resolveTypeIfNeeded(getContentResolver()),
    PackageManager.MATCH_DEFAULT_ONLY,
    filter, bestMatch, intent.getComponent());

相关文章

Intent类方法