A temporary file can be created using the method java.io.File.createTempFile. This method requires two parameters i.e. The prefix to define the. A lot of other temp files are created by apps with access to “storage” or “sd”. How do I stop my Android phone from creating a.nomedia file?
Active2 years, 1 month ago
I am trying to create a temporary file in application context and want to use it to fill a logcat of application but getting a problem as error given from application that file not exist. Here is my code:
Here is a exception:
I already have permission in my application:
Can someone tell me why this is not working?
user565user565
1 Answer
![File File](/uploads/1/2/6/2/126262878/207775538.png)
You're trying to execute the command 'logcat -d tempfilename' with no parameters, instead of the command 'logcat' with parameters '-d' and 'tempfilename'. The OS is looking for an executable called 'logcat -d tempfilename' instead of 'logcat'.
See this question for a code snippet that works (question itself, not the answers).
Xavier Rubio JansanaXavier Rubio Jansana4,98211 gold badge1717 silver badges4040 bronze badges