I am following the Camera API instructions for Android Studio here... https://developer.android.com/guide/topics/media/camera.html#custom-camera
In it is a method that gets the name of the image file to be saved. It starts with this line:
private static File getOutputMediaFile(int type){...
Now in my app I want to be able to get the name of the most recent image saved in order to open it. However, this static method is not allowing me to copy the name to a public or non static string in order to access from another method.
I am a beginner in Java, so I'm wondering what the best way to approach this would be.
My question is, is there any harm in making this method non static?
Making it non-static still seems to work, and it allows me to access the name of the file from outside the method. However, I'm guessing that there is a good reason to make it static that I'm simply not aware of. Any ideas?