My Problem: I'm struggling to figure out why my app cannot open images (stored internal to the app in the Files directory created by the OS), but Android Studio and Emulator have no issue opening the images? When prompted to select an app (Gallery or Photo) on the phone, Gallery opens with an image of an explanation point, and selecting Photo results in a cursor hang on a blank screen.
The emulator build is Pixel version 9. The app is setup to the recommended minSdkVersion of 28, and compiled and targeted to 29. The phone is a Galaxy A10e which is also Android version 9.
What I have done: I've worked with this code a lot since I'm 4-6 months new to Android development. I'm using the following Intentdriven code and have used a hard coded mime type (e.g. "image/jpeg"), a MimeTypeMap class in case that worked better, and also eliminated the mime type designation altogether. In all 3 cases, the app opened the images successfully in Android studio, but all failed when installed to the phone.
I'm not sure where to go from here. It is quite possible I'm missing a simple step or issue. If there is more that I can add to help me solve this issue I will be happy to provide it. I have posted this issue at StackOverflow (see link below), but I forgot about Java Ranch and Code Ranch and have had friendly, successful help here in the past with other Java projects. I tried to find the posting rules as to whether I was allowed to post since I did to StackOverflow, so I apologize if I broke any rules.
I have not ever tried debugging with my phone so I took the time with your suggestions and tried. I started with "Run apps on a hardware device" on developer.android.com. When using Device Manager (Windows 10), I'm stuck on which driver to select, there are about 15-20. I used the wizard with searching sub folders and still received that the current driver was best. So I tried without since I kept getting the message that my current driver was the best. However, when I hook up the phone, it is an "unknown device" and click run the app fails to install and run. Any guidance would be helpful and then maybe I can find the real issue.