Skip to content

Instantly share code, notes, and snippets.

View sajjadyousefnia's full-sized avatar
🤒
Out sick

Sajjad Yousefnia sajjadyousefnia

🤒
Out sick
View GitHub Profile
package com.divadventure.divadventure.ui.otp
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
package com.sajjady.recorder.Socket
import android.annotation.SuppressLint
import android.content.Context
import android.media.AudioFormat
import android.media.AudioRecord
import android.media.MediaCodec
import android.media.MediaCodecInfo
import android.media.MediaFormat
import android.media.MediaMuxer
package com.divadventure.divadventure.ViewModel
import com.divadventure.divadventure.BaseViewModel
import com.divadventure.divadventure.data.AuthService
import dagger.hilt.android.lifecycle.HiltViewModel
import timber.log.Timber
import javax.inject.Inject
import javax.inject.Singleton
@HiltViewModel
{
"personal information": {
"name": "کاربر",
"email": "[email protected]",
"phone_number": "",
"profile_picture": "",
"my_level": {
"level_id": 1,
"level_name": "A1"
},
package com.divadventure.divadventure
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.isEmpty
package com.divadventure.divadventure
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.Modifier
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
package com.divadventure.divadventure.domain
import com.divadventure.divadventure.SignupResultWrapper
import com.divadventure.divadventure.data.AuthRepository
import com.divadventure.divadventure.data.Model.SignUpResponse
import com.divadventure.divadventure.data.Model.SignupRequest
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
package com.divadventure.divadventure.ui
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.IntrinsicSize
import androidx.compose.foundation.layout.PaddingValues
package com.yourpackage
import android.accessibilityservice.AccessibilityService
import android.accessibilityservice.AccessibilityServiceInfo
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.net.Uri
import android.os.Handler
////***************************************************************************************************************************************************
////***************************************************************************************************************************************************
private var continueToRun: Boolean = true
private var minimumBufferSize: Int = -1
private var audioRecord: AudioRecord? = null
private var audioEncoder: MediaCodec? = null
private var socket: Socket? = null
// private val serverUrl = AppConstants.apiBaseURL