I'm working on an app that needs to send an automatic email on button click. the problem I am currently have is that I need to read a json file and when I pass the path of the json stored in assets into into a new FileReader()
I get a file not found Exception
. here is how I am getting the path. (wondering if Uri.parse().toString
is redundant):
private static final String CLIENT_SECRET_PATH =
Uri.parse("file:///android_asset/raw/sample/***.json").toString()
and here is the method I am passing it into:
sClientSecrets = GoogleClientSecrets
.load(jsonFactory, new FileReader(CLIENT_SECRET_PATH));
the json file that I am attemping to access is in my apps asset folder under the app root in android project directory (/app/assets/)
I am not sure what I am doing wrong here but I'm sure it is something simple. please help point me in the right direction.