Skip to content

Instantly share code, notes, and snippets.

View anandrex5's full-sized avatar
🎯
Focusing

Anand Nishad anandrex5

🎯
Focusing
View GitHub Profile
@anandrex5
anandrex5 / ApiClient.kt
Created July 28, 2022 12:47
Query Api Fetch using Adapter (Kotlin + Multiple Data Classes )
package com.example.exam3.application.network
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
object ApiClient {
val BASE_URL : String = " https://newsapi.org/"
@anandrex5
anandrex5 / GetAPI.kt
Created July 28, 2022 12:21 — forked from sudhirkrsingh/GetAPI.kt
APIWithRxJava
package com.mega.kotlinapp.postAPIKotlin.mvvvm.network
import okhttp3.Interceptor
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
import retrofit2.adapter.rxjava3.RxJava3CallAdapterFactory
import retrofit2.converter.gson.GsonConverterFactory
object GetAPI {
@anandrex5
anandrex5 / ApiClient.kt
Last active June 29, 2023 07:58 — forked from ankitchauhan20/ApiClient.kt
Retrofit with MVVM (Get Api)
package com.example.application.network
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
object ApiClient {
val BASE_URL: String = "https://jsonplaceholder.typicode.com/"
var retrofit: Retrofit? = null
@anandrex5
anandrex5 / AndroidManifest.xml
Created July 25, 2022 13:05
RxJava_Roomdata_Base (update/insert/delete) Operation in Kotlin
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.rx_java_using_kotlin">
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
@anandrex5
anandrex5 / AndroidManifest.xml
Created July 13, 2022 18:04
SQLite Implementation Kotlin
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.mysql_lite">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
@ankitchauhan20
ankitchauhan20 / ApiClient.kt
Created June 29, 2022 10:21
Retrofit Get In Kotlin
package com.example.kotlintutorial
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
class ApiClient {
@anandrex5
anandrex5 / AndroidManifest.xml
Last active June 28, 2022 09:08
Retrofit @get + UI + Recycler View show Status codes using SnackBar & ViewBinding
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.exam2">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:usesCleartextTraffic="true"
@anandrex5
anandrex5 / AndroidManifest.xml
Last active June 24, 2022 10:03
Retrofit @get with Recycler View + GUI
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.exam2">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:usesCleartextTraffic="true"
@anandrex5
anandrex5 / AndroidManifest.xml
Last active June 22, 2022 05:32
Retrofit by Using PostRetrofit Using Post
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.retropost">
<uses-permission android:name="android.permission.INTERNET"/>
<application
@anandrex5
anandrex5 / ApiPostRequest
Last active June 22, 2022 05:32
Retrofit Post Api
//Main Activity (Java Class )
package com.example.myapplication;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;