Skip to content

Instantly share code, notes, and snippets.

View birdeveloper's full-sized avatar
🏠
Working from home

Görkem KARA birdeveloper

🏠
Working from home
View GitHub Profile
@birdeveloper
birdeveloper / Logger
Created January 26, 2022 22:15
android log util file with java
import android.util.Log;
import com.google.gson.Gson;
import com.app.name.BuildConfig;
/**
* This class defines the Logger
*/
public final class Logger {
val storageRef = Firebase.storage.reference
fun uploadPhoto(photoUrl: Uri, onComplete: (downloadUrl: String?) -> Unit){
val profilePhotosRef = storageRef.child("photos/${getPref().firebaseUuid}")
val metadata = storageMetadata {
contentType = "image/jpeg"
}
d { "uploadPhoto: $photoUrl" }
val photoFile = photoUrl
val uploadTask = profilePhotosRef.putFile(photoFile,metadata)