android.app.Activity.getExternalCacheDir()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(333)

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

Activity.getExternalCacheDir介绍

暂无

代码示例

代码示例来源:origin: WVector/AppUpdate

if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) || !Environment.isExternalStorageRemovable()) {
  try {
    path = getActivity().getExternalCacheDir().getAbsolutePath();
  } catch (Exception e) {
    e.printStackTrace();

代码示例来源:origin: com.uphyca/android-junit4-robolectric

/**
 * @return
 * @see android.content.ContextWrapper#getExternalCacheDir()
 */
public File getExternalCacheDir() {
  return mActivity.getExternalCacheDir();
}

代码示例来源:origin: ydcx/KooReader

private String getExternalCacheDirPath() {
  File d = context.getExternalCacheDir();
  if (d != null) {
    d.mkdirs();
    if (d.exists() && d.isDirectory()) {
      return d.getPath();
    }
  }
  return null;
}

代码示例来源:origin: Chengel-HaltuD/WeChatForward

Log.i("Chengel_HaltuD", "其他==开始往下执行11111==0.1");
File file = getActivity().getExternalCacheDir();

代码示例来源:origin: materialos/android-icon-pack

saveFolder = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N ? context.getCacheDir() : context.getExternalCacheDir();
name = String.format("%s_%s_wallpaper.%s",
    wallpaper.name.replace(" ", "_"),

代码示例来源:origin: ngageoint/geopackage-android

File externalDirectory = activity.getExternalCacheDir();
File createFile = new File(externalDirectory, TestConstants.IMPORT_DB_FILE_NAME);
createFile.delete();

相关文章

Activity类方法