Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Delete image from application folder

Hello,

I want to delete an image from application folder. When i clicked an image, its get stored in this path: "file:///storage/emulated/0/Android/data/package name/cache/1400345667.jpg". I want to delete that image when my image successfully uploaded an image to server.

This code that i have tried:

     // imagepath2 is the path of my image

        if(imagePath2.length()>0)

        {

            File f = new File(imagePath2);

            if (f.exists()) {

                f.delete();

            }

        }

But it does not go in if condition.

So please help me out.

Regards,

Siddharth

Comments
Post Details
Added on Sep 9 2014
0 comments
695 views