Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- context = InstrumentationRegistry.getTargetContext();
- String filenameOriginal = context.getCacheDir() + "/initial.csv";
- appsrcandroidTest
- └───res
- └───raw
- v1.csv
- public static Uri resourceToUri(Context context, int resID)
- {
- return Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
- context.getResources().getResourcePackageName(resID) + '/' +
- context.getResources().getResourceTypeName(resID) + '/' +
- context.getResources().getResourceEntryName(resID));
- }
- resourceToUri(context, R.raw.v1)
- import com.my_thing.app.my_app.test.R;
- context = InstrumentationRegistry.getInstrumentation().getContext();
Add Comment
Please, Sign In to add comment