This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# I put all my dev stuff in here | |
export DEV_PREFIX=${PWD}/buildings | |
# Don't forget to adjust this to your NDK path | |
export ANDROID_PREFIX=${HOME}/Android/Sdk | |
export ANDROID_NDK=${ANDROID_PREFIX}/ndk/23.1.7779620 | |
# export CROSS_COMPILE=aarch64-linux-android31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun saveFileToMediaStorage(bmp: Bitmap) { | |
val resolver = applicationContext.contentResolver | |
val contentValues = ContentValues().apply { | |
put(MediaStore.MediaColumns.DISPLAY_NAME, "photo.bmp") | |
put(MediaStore.MediaColumns.MIME_TYPE, "image/bmp") | |
put(MediaStore.MediaColumns.RELATIVE_PATH, "Pictures/") | |
} | |
val uri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues) |