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
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> | |
<uses-permission android:name="com.huawei.permission.external_app_settings.USE_COMPONENT" /> | |
<uses-permission android:name="oppo.permission.OPPO_COMPONENT_SAFE" /> | |
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" /> | |
val receiver = ComponentName(context, AlarmReceiver::class.java) | |
context.packageManager.setComponentEnabledSetting( | |
receiver, |
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
import java.util.stream.IntStream | |
object Funciones { | |
private const val NUMERO_MULTIPLO_DE_PAR = 2 | |
private infix fun Int.doubleDiv(i: Int): Double = this / i.toDouble() | |
infix fun Int.esMultiplo(numero:Int):Boolean = this % numero == 0 |
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
OneSignalUtils.setupOneSignal(instance.applicationContext) | |
// Resource Required | |
1. small icon | |
2. large icon |
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
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools"> | |
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <!-- Notification Permission --> | |
<application ...> | |
<receiver | |
android:name=".notifyme.NotificationPublisher" | |
android:enabled="true" | |
android:exported="true" |
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
// Why use inline classes? 🤔 | |
// 🎯 Compile time safety | |
// 🎯 Less runtime overhead than a normal wrapper class as it "inlines" the data into its usages | |
// More info : https://kotlinlang.org/docs/reference/inline-classes.html | |
// Without inline classes 😞 | |
data class Recipe(id: UUID) | |
data class Ingredient(id: UUID, recipeId: UUID) |
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
/* Copyright 2022 Google LLC. | |
SPDX-License-Identifier: Apache-2.0 */ | |
@Composable | |
fun BouncyRopes() { | |
val startCoOrdinate by remember { | |
mutableStateOf(Offset(0f, 0f)) | |
} | |
var endCoOrdinate by remember { | |
mutableStateOf(Offset(100f, 0f)) | |
} |
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
import android.content.Context | |
import android.os.RemoteException | |
import com.android.installreferrer.api.InstallReferrerClient | |
import com.android.installreferrer.api.InstallReferrerStateListener | |
import com.android.installreferrer.api.ReferrerDetails | |
import kotlinx.coroutines.CompletableDeferred | |
/** | |
* https://developer.android.com/google/play/installreferrer/library | |
* |
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
import android.content.Intent | |
import android.graphics.PixelFormat | |
import android.os.IBinder | |
import android.view.Gravity | |
import android.view.WindowManager | |
import androidx.compose.foundation.gestures.detectDragGestures | |
import androidx.compose.foundation.layout.Box | |
import androidx.compose.foundation.layout.BoxScope | |
import androidx.compose.runtime.Composable | |
import androidx.compose.runtime.getValue |
NewerOlder