android.support.v4.app.FragmentActivity.getDir()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(108)

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

FragmentActivity.getDir介绍

暂无

代码示例

代码示例来源:origin: Skarafaz/mercury

private File getLogDir() {
    return getActivity().getDir(LOG_DIR, Context.MODE_PRIVATE);
  }
}

代码示例来源:origin: wiglenet/wigle-wifi-wardriving

@Override
protected void subRun() throws IOException, InterruptedException, WiGLEAuthException {
  status = Status.UNKNOWN;
  final Bundle bundle = new Bundle();
  sendBundledMessage( Status.DOWNLOADING.ordinal(), bundle );
  String result = null;
  try {
    result = doDownload(this.connectionMethod);
    writeSharefile(result, cacheFilename);
    final JSONObject json = new JSONObject("{success: " + true + ", file:\"" +
        (MainActivity.hasSD()? MainActivity.getSDPath() : context.getDir("kml", Context.MODE_PRIVATE).getAbsolutePath() + "/" ) + cacheFilename + "\"}");
    sendBundledMessage( Status.SUCCESS.ordinal(), bundle );
    listener.requestComplete(json, false);
  } catch (final WiGLEAuthException waex) {
    // ALIBI: allow auth exception through
    sendBundledMessage( Status.FAIL.ordinal(), bundle );
    throw waex;
  } catch (final JSONException ex) {
    sendBundledMessage( Status.FAIL.ordinal(), bundle );
    MainActivity.error("ex: " + ex + " result: " + result, ex);
  }
}

相关文章

微信公众号

最新文章

更多

FragmentActivity类方法