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 / Get Android phone call history.md
Created June 4, 2024 10:10 — forked from kannansuresh/Get Android phone call history.md
Get Android phone call history/log programmatically

Source: AndroidDev

To get call history programmatically first add read contact permission in Manifest file:

<uses-permission android:name="android.permission.READ_CONTACTS" />

Create xml file. Add the below code in xml file:

<Linearlayout android:layout_height="fill_parent"
@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
package com.example.kotlintutorial.presentation.view.adapter
import android.content.Intent
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.databinding.DataBindingUtil
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.example.kotlintutorial.dataModel.model.CountryBanner
@anandrex5
anandrex5 / ApiClient.kt
Created June 29, 2022 10:46 — forked from ankitchauhan20/ApiClient.kt
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 {
package com.example.oopstutorial.Adapters;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
@anandrex5
anandrex5 / ApiClient.java
Created June 2, 2022 06:54 — forked from SalaSuresh/ApiClient.java
Android RecyclerView Example with Retrofit library.
package suresh.androidtest;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
/**
* Created by Dumadu on 26-Oct-17.
*/
public class ApiClient {
@anandrex5
anandrex5 / AndroidManifest.xml
Last active May 31, 2022 12:27 — forked from codinginflow/AndroidManifest.xml
Retrofit Tutorial
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.codinginflow.retrofitexample">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"