This file contains hidden or 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
import android.content.ContentValues | |
import android.content.Context | |
import android.os.Build | |
import android.os.Environment | |
import android.provider.MediaStore | |
import com.google.gson.JsonArray | |
import com.google.gson.JsonElement | |
import com.google.gson.JsonObject | |
import com.google.gson.JsonParser | |
import com.google.gson.internal.Streams |
This file contains hidden or 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
import android.content.ContentValues | |
import android.content.Context | |
import android.os.Build | |
import android.os.Environment | |
import android.provider.MediaStore | |
import com.google.gson.JsonArray | |
import com.google.gson.JsonElement | |
import com.google.gson.JsonObject | |
import com.google.gson.JsonParser | |
import com.google.gson.internal.Streams |
This file contains hidden or 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
You are Manus, an AI agent created by the Manus team. | |
You excel at the following tasks: | |
1. Information gathering, fact-checking, and documentation | |
2. Data processing, analysis, and visualization | |
3. Writing multi-chapter articles and in-depth research reports | |
4. Creating websites, applications, and tools | |
5. Using programming to solve various problems beyond development | |
6. Various tasks that can be accomplished using computers and the internet |
This file contains hidden or 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
actual suspend fun exportZipFile( | |
platformContext: PlatformContext, | |
allExportResponse: AllExportResponse | |
) = | |
withContext(Dispatchers.IO) { | |
val zipBytes = createZipFromExportResponse(allExportResponse) | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { | |
saveToDownloadsScopedStorage(platformContext.context, allExportResponse.fileName, zipBytes) | |
} else { |
This file contains hidden or 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
/*Copied this code from @akardas16: | |
* https://github.com/adrielcafe/voyager/issues/360#issuecomment-2010514347*/ | |
@Composable | |
fun BackPressHandler( | |
backPressedDispatcher: OnBackPressedDispatcher? = | |
LocalOnBackPressedDispatcherOwner.current?.onBackPressedDispatcher, | |
onBackPressed: () -> Unit | |
) { | |
val currentOnBackPressed by rememberUpdatedState(newValue = onBackPressed) |
This file contains hidden or 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
kotlin { | |
// iOS Targets | |
val iosArm64 = iosArm64() | |
val iosX64 = iosX64() | |
val iosSimulatorArm64 = iosSimulatorArm64() | |
// macOS Targets | |
val macosX64 = macosX64() | |
val macosArm64 = macosArm64() |
This file contains hidden or 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
plugins{ | |
id("maven-publish") | |
} | |
// Publishing Maven -- start | |
publishing { | |
publications { | |
create<MavenPublication>("customAndroidMavenRelease") { | |
groupId = "com.aliazaz.testkmplibrary" | |
artifactId = "sharedLibrary" |
This file contains hidden or 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
tasks.register<Jar>("publishBundleFatAar") { | |
group = "publish-arr" | |
description = "Publish bundle fat jar for android" | |
archiveBaseName.set("${project.name}-fat") | |
archiveExtension.set("aar") | |
val releaseAarFile = tasks.getByName("bundleReleaseAar").outputs.files.singleFile | |
// Include the contents of the release AAR |
This file contains hidden or 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
import com.google.zxing.BarcodeFormat | |
import com.google.zxing.MultiFormatWriter | |
import com.google.zxing.WriterException | |
import com.google.zxing.common.BitMatrix | |
@Throws(WriterException::class) | |
fun textToImageEncode(context: Context, QRcodeWidth: Int, Value: String?): Bitmap? { | |
val bitMatrix: BitMatrix | |
try { | |
bitMatrix = MultiFormatWriter().encode( |
This file contains hidden or 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
class CoroutineDispatcherHelper : IDispatcher { | |
override fun dispatcherIO(): CoroutineDispatcher = Dispatchers.IO | |
override fun dispatcherMain(): CoroutineDispatcher = Dispatchers.Main | |
override fun dispatcherDefault(): CoroutineDispatcher = Dispatchers.Default | |
} |
NewerOlder