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 makePublisherAdView(context: Context, adUnitId: String, adomik: String): PublisherAdView { | |
val publisherAdView = PublisherAdView(context) | |
publisherAdView.adUnitId = adUnitId | |
publisherAdView.setAdSizes(AdSize.MEDIUM_RECTANGLE) | |
val adRequest = PublisherAdRequest.Builder().addCustomTargeting("ad_group", adomik) | |
publisherAdView.loadAd(adRequest.build()) | |
return publisherAdView | |
} | |
/** |
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 com.google.gson.Gson | |
import com.google.gson.JsonElement | |
import kotlin.random.Random | |
import kotlin.reflect.KClass | |
import kotlin.reflect.KType | |
import kotlin.reflect.KTypeParameter | |
import kotlin.reflect.typeOf | |
@ExperimentalStdlibApi |
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
[ | |
{ | |
"id": 1, | |
"name": "Android-Test1", | |
"description": "Android-Test1 description" | |
}, | |
{ | |
"id": 2, | |
"name": "Android-Test2", | |
"description": "Android-Test2 description" |
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
android.buildTypes { | |
mock { | |
buildConfigField "String", "BASE_API_URL", "\"https://c77b2784-b60b-491b-af7e-273c356ef4a2.mock.pstmn.io\"" | |
} | |
debug { | |
buildConfigField "String", "BASE_API_URL", "\"https://api.github.com/\"" | |
} | |
release { | |
buildConfigField "String", "BASE_API_URL", "\"https://api.github.com/\"" | |
} |
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
BuildConfig.BASE_API_URL |
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
1. hiltvm (applicable in top-level) | |
@dagger.hilt.android.lifecycle.HiltViewModel | |
class $NAME$ @javax.inject.Inject constructor( | |
$PARAM$ | |
) : androidx.lifecycle.ViewModel() { | |
$END$ | |
} | |
2. vmstatefunc (applicable in class) | |
private val _$NAME$ = androidx.compose.runtime.mutableStateOf<$TYPE$>($INITIAL_VALUE$) |