I need to add my SSL certificate for Retrofit in Android but I can't find the file using Google's example code for doing this.
Here's the example from Google that I'm using https://developer.android.com/training/articles/security-ssl
When running:
val caInput: InputStream = BufferedInputStream(FileInputStream("rest_of_the_world_production.crt"))
I get the error
Caused by: java.io.FileNotFoundException: rest_of_the_world_production.crt: open failed: ENOENT (No such file or directory)
and an instant crash when trying to access the file. The file is currently stored as a crt file under res/raw/rest_of_the_world_production.crt so why can't Android find it?