Create provider_paths.xml
in res/xml
folder and write below code in it.
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
-keepclassmembers class com.google.android.gms.dynamite.DynamiteModule { | |
** MODULE_ID; | |
** MODULE_VERSION; | |
** sClassLoader; | |
} | |
-keepclassmembers class com.google.android.gms.internal.in { | |
** mOrigin; | |
** mCreationTimestamp; | |
** mName; | |
** mValue; |
@Composable | |
fun FlipActionScreen() { | |
var flippedState by remember { mutableStateOf(false) } | |
val rotationY by animateFloatAsState( | |
targetValue = if (flippedState) 180f else 0f, | |
animationSpec = spring( | |
dampingRatio = Spring.DampingRatioHighBouncy, | |
stiffness = Spring.StiffnessVeryLow | |
) | |
) |
import kotlinx.coroutines.* | |
// this code snipped from Vengatesh M.’s Post https://www.linkedin.com/feed/update/urn:li:activity:7150818581406994432/ | |
fun main() { | |
val viewmodel = ViewModel() | |
runBlocking { | |
viewmodel.getDataFromApi() | |
} | |
} | |
import com.apollographql.apollo3.ApolloClient | |
import com.apollographql.apollo3.api.ApolloResponse | |
import com.apollographql.apollo3.api.Mutation | |
import com.apollographql.apollo3.api.Operation | |
import com.apollographql.apollo3.api.Query | |
import com.apollographql.apollo3.exception.ApolloException | |
import timber.log.Timber | |
/** | |
* This class handles the execution of GraphQL queries and mutations using the Apollo client. |
import okhttp3.OkHttpClient | |
import java.security.cert.CertificateException | |
import javax.net.ssl.SSLContext | |
import javax.net.ssl.TrustManager | |
import javax.net.ssl.X509TrustManager | |
class UnsafeOkHttpClient { | |
companion object { | |
fun getUnsafeOkHttpClient(): OkHttpClient.Builder { | |
try { |
suspend fun downloadFile(url: String, | |
downloadFile: File, | |
downloadProgressFun: (bytesRead: Long, contentLength: Long, isDone: Boolean) -> Unit) { | |
async(CommonPool) { | |
val request = with(Request.Builder()) { | |
url(url) | |
}.build() | |
val client = with(OkHttpClient.Builder()) { | |
addNetworkInterceptor { chain -> |
public class MyPersonalApp extends Application { | |
/** | |
* Called when the application is starting, before any activity, service, or receiver objects (excluding content providers) have been created. | |
*/ | |
public void onCreate() { | |
super.onCreate(); | |
if ( isExternalStorageWritable() ) { |
import android.os.Environment; | |
import android.util.Log; | |
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.text.SimpleDateFormat; | |
import java.util.Calendar; |