本文整理了Java中android.support.v4.app.FragmentActivity.getDir()
方法的一些代码示例,展示了FragmentActivity.getDir()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FragmentActivity.getDir()
方法的具体详情如下:
包路径:android.support.v4.app.FragmentActivity
类名称: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);
}
}
内容来源于网络,如有侵权,请联系作者删除!