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


Java Media类代码示例

本文整理汇总了Java中android.provider.MediaStore.Video.Media的典型用法代码示例。如果您正苦于以下问题:Java Media类的具体用法?Java Media怎么用?Java Media使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getPath

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
public static String getPath(Context context, Uri uri) {
    if (uri == null) {
        return null;
    }
    String string;
    if (uri.getScheme().toString().compareTo("content") == 0) {
        Cursor query = context.getContentResolver().query(Media.EXTERNAL_CONTENT_URI, null, null, null, null);
        if (query == null || !query.moveToFirst()) {
            return null;
        }
        string = query.getString(query.getColumnIndexOrThrow("_data"));
        query.close();
        return string;
    } else if (uri.getScheme().compareTo("file") != 0) {
        return null;
    } else {
        string = uri.toString();
        return uri.toString().replace("file://", "");
    }
}
 
开发者ID:stytooldex,项目名称:stynico,代码行数:21,代码来源:FileUtils.java

示例2: c

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
public static boolean c(Uri paramUri)
{
  boolean bool1 = mfq.b(paramUri);
  boolean bool2 = false;
  if (bool1)
  {
    String str1 = paramUri.getPath();
    String str2 = MediaStore.Images.Media.EXTERNAL_CONTENT_URI.getPath();
    String str3 = MediaStore.Video.Media.EXTERNAL_CONTENT_URI.getPath();
    if (!str1.startsWith(str2))
    {
      boolean bool3 = str1.startsWith(str3);
      bool2 = false;
      if (!bool3) {}
    }
    else
    {
      bool2 = true;
    }
  }
  return bool2;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:23,代码来源:efj.java

示例3: getBucketIds

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
public HashMap<String, String> getBucketIds() {
    Uri uri = mBaseUri.buildUpon()
            .appendQueryParameter("distinct", "true").build();
    Cursor c = Images.Media.query(
            mContentResolver, uri,
            new String[] {
                Media.BUCKET_DISPLAY_NAME,
                Media.BUCKET_ID
            },
            whereClause(), whereClauseArgs(), sortOrder());
    try {
        HashMap<String, String> hash = new HashMap<String, String>();
        while (c.moveToNext()) {
            hash.put(c.getString(1), c.getString(0));
        }
        return hash;
    } finally {
        c.close();
    }
}
 
开发者ID:petalyaa,项目名称:Launchpet2,代码行数:21,代码来源:VideoList.java

示例4: getBucketIds

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
public HashMap<String, String> getBucketIds() {
    Uri uri = mBaseUri.buildUpon().appendQueryParameter("distinct", "true").build();
    Cursor c = Images.Media.query(mContentResolver, uri, new String[]{Media.BUCKET_DISPLAY_NAME, Media.BUCKET_ID}, whereClause(), whereClauseArgs(), sortOrder());
    try {
        HashMap<String, String> hash = new HashMap<String, String>();
        while (c.moveToNext()) {
            hash.put(c.getString(1), c.getString(0));
        }
        return hash;
    } finally {
        c.close();
    }
}
 
开发者ID:goodev,项目名称:droidddle,代码行数:14,代码来源:VideoList.java

示例5: h

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
public static void h()
{
  if (PW == null)
  {
    itd[] arrayOfitd = new itd[4];
    arrayOfitd[0] = new isz(MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
    arrayOfitd[1] = new isz(itf.b);
    arrayOfitd[2] = new ite(MediaStore.Video.Media.EXTERNAL_CONTENT_URI);
    arrayOfitd[3] = new ite(itf.a);
    PW = arrayOfitd;
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:13,代码来源:efj.java

示例6: hbr

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
public hbr(String paramString1, String paramString2)
{
  this.a = paramString1;
  this.b = paramString2;
  if ("photo".equals(paramString1))
  {
    if ("external".equals(paramString2)) {}
    for (this.c = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;; this.c = itf.b)
    {
      this.e = hbo.b;
      return;
      if (!"phoneStorage".equals(paramString2)) {
        break;
      }
    }
    throw new IllegalArgumentException("Invalid volume name; must be one of the defined volumes");
  }
  if ("video".equals(paramString1))
  {
    if ("external".equals(paramString2)) {}
    for (this.c = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;; this.c = itf.a)
    {
      this.e = hbo.a;
      return;
      if (!"phoneStorage".equals(paramString2)) {
        break;
      }
    }
    throw new IllegalArgumentException("Invalid volume name; must be one of the defined volumes");
  }
  throw new IllegalArgumentException("Invalid media type; must be one of the defined types");
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:33,代码来源:hbr.java

示例7: a

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
public final void a(jpg paramjpg)
{
  MediaPickerFragment localMediaPickerFragment = this.a;
  if (paramjpg.a()) {
    localMediaPickerFragment.a("_data", MediaStore.Video.Media.EXTERNAL_CONTENT_URI, ipm.b);
  }
  for (;;)
  {
    localMediaPickerFragment.v();
    return;
    Toast.makeText(localMediaPickerFragment.bn, localMediaPickerFragment.g().getString(da.w), 1).show();
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:14,代码来源:iry.java

示例8: createCursor

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
@Override
protected Cursor createCursor() {
    Cursor c = Images.Media.query(
            mContentResolver, mBaseUri, VIDEO_PROJECTION,
            whereClause(), whereClauseArgs(), sortOrder());
    return c;
}
 
开发者ID:petalyaa,项目名称:Launchpet2,代码行数:8,代码来源:VideoList.java

示例9: whereClause

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
protected String whereClause() {
    return mBucketId != null ? Images.Media.BUCKET_ID + " = '" + mBucketId + "'" : null;
}
 
开发者ID:goodev,项目名称:droidddle,代码行数:4,代码来源:VideoList.java

示例10: createCursor

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
@Override
protected Cursor createCursor() {
    Cursor c = Images.Media.query(mContentResolver, mBaseUri, VIDEO_PROJECTION, whereClause(), whereClauseArgs(), sortOrder());
    return c;
}
 
开发者ID:goodev,项目名称:droidddle,代码行数:6,代码来源:VideoList.java

示例11: a

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
private static String a(Context paramContext)
{
  Uri[] arrayOfUri = new Uri[4];
  arrayOfUri[0] = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
  arrayOfUri[1] = itf.b;
  arrayOfUri[2] = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
  arrayOfUri[3] = itf.a;
  String[] arrayOfString = { "_id" };
  ContentResolver localContentResolver = paramContext.getContentResolver();
  int i = 0;
  for (;;)
  {
    Object localObject1 = null;
    Cursor localCursor;
    if (i < 4)
    {
      localCursor = localContentResolver.query(arrayOfUri[i], arrayOfString, "_data LIKE '%/DCIM/%'", null, "_id DESC LIMIT 1");
      if (localCursor == null) {
        break label130;
      }
    }
    try
    {
      if (localCursor.moveToNext())
      {
        long l = localCursor.getLong(0);
        String str = ContentUris.withAppendedId(arrayOfUri[i], l).toString();
        localObject1 = str;
        return localObject1;
      }
      label130:
      if (localCursor != null) {
        localCursor.close();
      }
      i++;
    }
    catch (SQLiteException localSQLiteException)
    {
      for (;;)
      {
        Log.e("allphotosview", "Could not load camera photo", localSQLiteException);
        if (localCursor != null) {
          localCursor.close();
        }
      }
    }
    finally
    {
      if (localCursor == null) {
        break;
      }
      localCursor.close();
    }
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:56,代码来源:bhr.java

示例12: onCreate

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
protected void onCreate(Bundle paramBundle)
{
  super.onCreate(paramBundle);
  Intent localIntent1 = getIntent();
  String str1 = localIntent1.getType();
  String str2;
  if (str1 != null) {
    if ("application/vnd.google.panorama360+jpg".equals(str1)) {
      str2 = "image/jpeg";
    }
  }
  while (str2 == null)
  {
    Toast.makeText(this, aau.lM, 1).show();
    finish();
    return;
    str2 = str1;
    continue;
    Uri localUri1 = localIntent1.getData();
    if (localUri1 != null) {
      str2 = getContentResolver().getType(localUri1);
    } else {
      str2 = null;
    }
  }
  Intent localIntent2 = new Intent(localIntent1);
  int i;
  if (("image/*".equals(str2)) || ("vnd.android.cursor.dir/image".equals(str2)))
  {
    i = 1;
    localIntent2.putExtra("filter", i);
    Uri localUri2 = localIntent1.getData();
    if ((localUri2 != null) && (!localUri2.equals(MediaStore.Images.Media.EXTERNAL_CONTENT_URI)) && (!localUri2.equals(MediaStore.Images.Media.INTERNAL_CONTENT_URI)) && (!localUri2.equals(MediaStore.Video.Media.EXTERNAL_CONTENT_URI)) && (!localUri2.equals(MediaStore.Video.Media.INTERNAL_CONTENT_URI))) {
      break label277;
    }
    if ((i & 0x2) == 0) {
      break label255;
    }
    localIntent2.setClass(this, HostPhotoViewIntentPhotoTileSearchActivity.class);
  }
  for (;;)
  {
    localIntent1.addFlags(33554432);
    startActivity(localIntent2);
    finish();
    return;
    if (!"video/*".equals(str2))
    {
      boolean bool = "vnd.android.cursor.dir/video".equals(str2);
      i = 0;
      if (!bool) {
        break;
      }
    }
    i = 2;
    break;
    label255:
    localIntent2.setClass(this, PhotosHomeActivity.class);
    localIntent2.putExtra("destination", 8);
    continue;
    label277:
    localIntent2.setClass(this, HostPhotoViewIntentPhotoOneUpActivity.class);
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:65,代码来源:HostPhotoViewIntentActivity.java

示例13: h

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
private final int h()
{
  int i = 1;
  Intent localIntent = getIntent();
  if (localIntent == null) {
    return 0;
  }
  String str1 = localIntent.getAction();
  String str2 = localIntent.getType();
  Uri localUri = localIntent.getData();
  if ("android.intent.action.PICK".equalsIgnoreCase(str1)) {
    if ((str2 != null) && (str2.startsWith("vnd.android.cursor.dir/"))) {
      if (!str2.endsWith("/image")) {}
    }
  }
  for (;;)
  {
    return i;
    if (str2.endsWith("/video"))
    {
      i = 2;
      continue;
      if (localUri != null)
      {
        if ((localUri.equals(MediaStore.Images.Media.EXTERNAL_CONTENT_URI)) || (localUri.equals(MediaStore.Images.Media.INTERNAL_CONTENT_URI)) || (localUri.toString().endsWith("/image"))) {
          continue;
        }
        if ((localUri.equals(MediaStore.Video.Media.EXTERNAL_CONTENT_URI)) || (localUri.equals(MediaStore.Video.Media.INTERNAL_CONTENT_URI)) || (localUri.toString().endsWith("/video"))) {
          i = 2;
        }
      }
      else
      {
        i = 0x0 | a(str2);
        continue;
        if ("android.intent.action.SEND".equalsIgnoreCase(str1))
        {
          i = 0x0 | a(str2);
          continue;
        }
        if ("android.intent.action.SEND_MULTIPLE".equalsIgnoreCase(str1))
        {
          i = 0x0 | a(str2);
          continue;
        }
        if (str2 != null)
        {
          i = 0x0 | a(str2);
          continue;
        }
      }
    }
    i = 0;
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:56,代码来源:GetContentActivity.java

示例14: whereClause

import android.provider.MediaStore.Video.Media; //导入依赖的package包/类
protected String whereClause() {
    return mBucketId != null
            ? Images.Media.BUCKET_ID + " = '" + mBucketId + "'"
            : null;
}
 
开发者ID:petalyaa,项目名称:Launchpet2,代码行数:6,代码来源:VideoList.java


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