val firebase_url = contentDTOs[p1].imageUrl val storageRef = firebase_url?.let { it1 -> FirebaseFirestore.getInstance().collection("images").document( it1 ) } storageRef?.delete()?.addOnSuccessListener { // File deleted successfully Toast.makeText(context , "Deleted",Toast.LENGTH_SHORT).show() }?.addOnFailureListener { // Uh-oh, an error occurred! Toast.makeText(context , "cannot delete",Toast.LENGTH_SHORT).show() } return@setOnLongClickListener true
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.videoapp, PID: 20522 java.lang.IllegalArgumentException: Invalid path (https://firebasestorage.googleapis.com/v0/b/video-app-af9bf.appspot.com/o/images%2FIMAGE_20201023_144632_.png?alt=media&token=9cd9d400-49ed-4f73-81b3-baa7668a8430). Paths must not contain // in them.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)