Skip to content

Instantly share code, notes, and snippets.

Open Sourcing

Yogesh Choudhary Paliyal yogeshpaliyal

Open Sourcing
View GitHub Profile

iOS In App Purchase

  1. Create app and products on App store.
  2. Fill tax, bank and agreements(free and paid).
  3. App side work. A. Use StoreKit (It will create local environment, no need to create sandbox account for this and you cannot verify receipt of this on server.) B. Old way.
  • Create sandbox account on itunes connect.
  • Query all purchase able items.
  • Purchase item (you will get popup to enter email and password, enter credentials of sandbox account)
yogeshpaliyal / CustomBottomSheet.kt
Created Nov 15, 2021
Show full screen bottom sheet
View CustomBottomSheet.kt
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val dialog = super.onCreateDialog(savedInstanceState)
dialog.setOnShowListener { dialogInterface ->
dialog.window?.findViewById<View>( { bottomSheetView ->
bottomSheetView.background = null
/* bottomSheetView.let {
BottomSheetBehavior.from(it).isFitToContents = true
BottomSheetBehavior.from(it).state = BottomSheetBehavior.STATE_EXPANDED
val bottomSheetDialog = dialogInterface as BottomSheetDialog
yogeshpaliyal / Resource.kt
Created Jun 23, 2021
Wrapper class for Data and Status
View Resource.kt
* @author Yogesh Paliyal
* Created Date : 15 October 2020
data class Resource<out T>(val status: Status, val data: T?, val message: String?) {
companion object {
fun <T> success(data: T?, message: String?= ""): Resource<T> {
return Resource(Status.SUCCESS, data, message)
yogeshpaliyal / AutCaller.kt
Last active Jun 23, 2021
Base Caller to work with coroutines
View AutCaller.kt
class AuthCaller : BaseCaller(){
fun login(email: String, password: String): Resource<BaseApiModel>{
return hitApi(Apis.LOGIN, HashMap<String,String>().apply{
yogeshpaliyal / Loading Listing.kt
Created Oct 29, 2020
Universal RecyclerView Adapters Initialize
View Loading Listing.kt
private val mAdapter by lazy {
resourceShimmer = R.layout.layout_loading_full_page,
defaultShimmerItems = 1,
mListener = object : BasicListener<UserModel> {
override fun onClick(model: UserModel) {
Toast.makeText(this@LoadingListingActivity,, Toast.LENGTH_SHORT)