I have created this file on my device:
file:///data/user/0/io.ionic.starter/files/mypdf.pdf
But I can’t figure out how to find that file manually using my android device. Any ideas? Note: I am using an emulator, Nexus 5X.
What do you mean by "manually"?
You can not access this file from another application on your Android device, such as a file manager or a PDF viewer.
This is because you created it inside your applications files
directory, which is guarded by file system permissions and is only accessible to your application.
There are two exceptions to this rule:
If you wish to access the file from you PC to examine it, you can use adb pull
command. Since you are using an emulator, ADB should be running as root.
If it is not, use adb root
command to switch ADB to run as root, then you will have no problem accessing any directory on the phone.
Keep in mind, this will not work on a real phone with stock ROM, as ADB can not run with root privileges on production systems.