kotlin

kotlin
package com.example.myapp.data.paging

import androidx.paging.PagingSource
import androidx.paging.PagingState
import com.example.myapp.data.remote.ApiService
import com.example.myapp.models.Post

Paging 3 library for data pagination

kotlin android paging
by Alex Chen 3 tabs
kotlin
package com.example.myapp.services

import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.PendingIntent
import android.content.Context

Firebase Cloud Messaging for push notifications

kotlin android firebase
by Alex Chen 2 tabs
kotlin
package com.example.myapp.ui.adapters

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter

RecyclerView with DiffUtil for efficient lists

kotlin android recyclerview
by Alex Chen 2 tabs
kotlin
package com.example.myapp.workers

import android.content.Context
import androidx.hilt.work.HiltWorker
import androidx.work.*
import dagger.assisted.Assisted

WorkManager for background tasks

kotlin android workmanager
by Alex Chen 2 tabs
kotlin
package com.example.myapp.billing

import android.app.Activity
import android.content.Context
import com.android.billingclient.api.*
import kotlinx.coroutines.flow.MutableStateFlow

In-app billing with Google Play

kotlin android billing
by Alex Chen 1 tab
kotlin
package com.example.myapp.ui.custom

import android.content.Context
import android.util.AttributeSet
import android.view.ViewGroup
import kotlin.math.max

Custom ViewGroup for advanced layouts

kotlin android custom-view
by Alex Chen 2 tabs
kotlin
package com.example.myapp.data.local

import android.content.Context
import android.content.SharedPreferences
import androidx.security.crypto.EncryptedSharedPreferences
import androidx.security.crypto.MasterKey

Encrypted SharedPreferences for secure storage

kotlin android security
by Alex Chen 1 tab
kotlin
package com.example.myapp.utils

import android.content.Context
import android.graphics.drawable.Drawable
import android.widget.ImageView
import com.bumptech.glide.Glide

Glide for image loading and caching

kotlin android glide
by Alex Chen 2 tabs
kotlin
package com.example.myapp.ui.player

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.example.myapp.databinding.ActivityVideoPlayerBinding
import com.google.android.exoplayer2.ExoPlayer

ExoPlayer for media playback

kotlin android exoplayer
by Alex Chen 2 tabs
kotlin
package com.example.myapp.receivers

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter

Broadcast Receivers for system events

kotlin android broadcastreceiver
by Alex Chen 2 tabs
kotlin
package com.example.myapp.services

import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.PendingIntent
import android.app.Service

Service and foreground notifications

kotlin android service
by Alex Chen 1 tab
kotlin
package com.example.myapp.ui.detail

import androidx.lifecycle.SavedStateHandle
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import dagger.hilt.android.lifecycle.HiltViewModel

MVVM architecture with ViewModel and LiveData

kotlin android mvvm
by Alex Chen 1 tab