List of usage examples for android.app Activity getFileStreamPath
@Override
public File getFileStreamPath(String name)
From source file:org.deviceconnect.android.deviceplugin.pebble.setting.PebbleSettingActivity.java
/** * ? pbw ?????? uri ?./*from w w w. j a v a 2 s .c o m*/ * @return uri ?. */ @SuppressLint("WorldReadableFiles") @SuppressWarnings("deprecation") private static Uri getPbwFileName(final Activity activity) { File file = activity.getFileStreamPath("dc_pebble.pbw"); try { fileCopy(activity.getResources().openRawResource(R.raw.dc_pebble), activity.openFileOutput(file.getName(), MODE_WORLD_READABLE)); } catch (IOException e) { e.printStackTrace(); } return Uri.fromFile(file); }