I want to know how can I use OnItemLongClickListener event to delete an image from gallery?
I don't know how can I find the url or another detail about the image from this event in order to delete it.
this is What I did so far (* I already have a gallery with images inside) : First I connect the gallery to the event :
gallery.setOnItemLongClickListener(OnLongClickGallery);
Then I want to ask the user if he sure that he want to delete the image and in the same time save the data from the selected item:
private OnItemLongClickListener OnLongClickGallery = new OnItemLongClickListener() {
    @Override
    public boolean onItemLongClick(AdapterView<?> arg0, View arg1,
            int arg2, long arg3) {
        //How I get the desired data here?
        showPopupMenu(arg1);// Show pop up list 
        return false;
    }
};
Thanks for help.