The getFilesDir()
somehow didn’t work.
Using a method, which returns the entire path and filename gave the desired result. Here is the code:
File file = new File(inputHandle.getImgPath(id));
boolean deleted = file.delete();
More Related Contents:
- Android file chooser [closed]
- How to read file from res/raw by name
- How do I serialize an object and save it to a file in Android?
- Creating temporary files in Android
- How to delete a whole folder and content?
- Android; Check if file exists without creating a new one
- Trying to create a file in Android: open failed: EROFS (Read-only file system)
- Android SAF (Storage Access FrameWork): Get particular file Uri from TreeUri
- How to pass a file path which is in assets folder to File(String path)? [duplicate]
- How to create/write file in the root of the Android device?
- How to delete internal storage file in android?
- How app can access files on USB OTG storages in Android 6.0 (API level 23) without root?
- How to jump and animate body like mario game character? [closed]
- How to start a Service when .apk is Installed for the first time
- Android – Set max length of logcat messages
- Android fetch all contact list (name, email, phone) takes more then a minute for about 700 contacts
- Android custom dropdown/popup menu
- Download files and store them locally with Phonegap/jQuery Mobile Android and iOS Apps
- Change CalendarView style
- Duplicate files copied (Android Studio 0.4.0) [duplicate]
- Android Studio – Failed to apply plugin [id ‘com.android.application’]
- How to make my own custom dialer in an Android phone
- Send auto email programmatically [duplicate]
- Unable to get dependencies from jcenter with a new project [closed]
- How to perform minification and obfuscation with the JACK compiler?
- How to autoplay HTML5 mp4 video on Android?
- Inflate layout programmatically within another layout
- Make Android WebView not store cookies or passwords
- How can I specify location of debug keystore for Android ant debug builds?
- How do I center the hint text within an EditText in Android?