Skip to content

Instantly share code, notes, and snippets.

Avatar
😉
Will have small delay in response as am working on a main module @_work

Ramesh M Nair rameshvoltella

😉
Will have small delay in response as am working on a main module @_work
View GitHub Profile
@rameshvoltella
rameshvoltella / MiddleDividerItemDecoration.kt
Created May 29, 2020 — forked from Veeyikpong/MiddleDividerItemDecoration.kt
MiddleDividerItemDecoration, suitable for both LinearLayoutManager and GridLayoutManager.
View MiddleDividerItemDecoration.kt
/*
* Copyright 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@rameshvoltella
rameshvoltella / AESDataSource.java
Created Dec 10, 2019 — forked from Parsoa/AESDataSource.java
ExoPlayer playing AES/GCM/NoPadding encrypted video
View AESDataSource.java
package com.sharifin.lang.storage;
import android.net.Uri ;
import com.google.android.exoplayer2.C ;
import com.google.android.exoplayer2.upstream.DataSource ;
import com.google.android.exoplayer2.upstream.DataSpec ;
import com.google.android.exoplayer2.upstream.TransferListener ;
import java.io.EOFException ;
@rameshvoltella
rameshvoltella / RecordingActivity.java
Created Oct 10, 2019 — forked from chathudan/RecordingActivity.java
Android Audio recording, MediaRecorder example
View RecordingActivity.java
/**
* @author Chathura Wijesinghe <cdanasiri@gmail.com> on 9/9/15.
*/
public class RecordingActivity extends AppCompatActivity implements View.OnClickListener {
private TextView mTimerTextView;
private Button mCancelButton;
private Button mStopButton;
private MediaRecorder mRecorder;
@rameshvoltella
rameshvoltella / SnappingRecyclerView.java
Created Jun 21, 2018 — forked from lauw/SnappingRecyclerView.java
Snapping RecyclerView (Horizontal)
View SnappingRecyclerView.java
/*
* Copyright 2015 Laurens Muller.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@rameshvoltella
rameshvoltella / NestedScrollWebView.java
Created Apr 26, 2018 — forked from alexmiragall/NestedScrollWebView.java
NestedWebView compatible with CoordinatorLayout
View NestedScrollWebView.java
package com.tuenti.nestedwebscrollview;
import android.content.Context;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.NestedScrollingChild;
import android.support.v4.view.NestedScrollingChildHelper;
import android.support.v4.view.NestedScrollingParent;
import android.support.v4.view.VelocityTrackerCompat;
import android.support.v4.view.ViewCompat;
import android.support.v4.widget.ScrollerCompat;
@rameshvoltella
rameshvoltella / UserAgentInterceptor.java
Created Mar 6, 2018 — forked from twaddington/UserAgentInterceptor.java
Injects a User-Agent header into outgoing OkHttp requests.
View UserAgentInterceptor.java
package com.enlighthq.mobile.http;
import android.os.Build;
import java.io.IOException;
import java.util.Locale;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
@rameshvoltella
rameshvoltella / build.gradle
Created Nov 16, 2017 — forked from ph0b/build.gradle
sample build.gradle for generating split APKs per ABI
View build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig{
minSdkVersion 14
targetSdkVersion 21
versionCode 101
@rameshvoltella
rameshvoltella / FirebaseDataReceiver.java
Created Sep 28, 2017 — forked from Antarix/FirebaseDataReceiver.java
Firebase Android Sample for managing notification
View FirebaseDataReceiver.java
import android.content.Context;
import android.content.Intent;
import android.support.v4.content.WakefulBroadcastReceiver;
import android.util.Log;
/**
* This is called whenever app receives notification
* in background/foreground state so you can
* apply logic for background task, but still Firebase notification
* will be shown in notification tray
@rameshvoltella
rameshvoltella / AccountUtils.java
Created Aug 28, 2017 — forked from imminent/AccountUtils.java
Utility to retrieve user profile on Android device
View AccountUtils.java
/**
* A collection of authentication and account connection utilities. With strong inspiration from the Google IO session
* app.
* @author Dandré Allison
*/
public class AccountUtils {
/**
* Interface for interacting with the result of {@link AccountUtils#getUserProfile}.
*/
@rameshvoltella
rameshvoltella / PhonecallReceiver.java
Created Aug 24, 2017 — forked from ftvs/PhonecallReceiver.java
Detecting an incoming call coming to an Android device. Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link. Usage example in comments. Source: http://stackoverflow.com/a/15564021/264619 Explanation: http://gabesechansoftware.com/is-the-phone-ringing/#more-8
View PhonecallReceiver.java
package com.gabesechan.android.reusable.receivers;
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
public abstract class PhonecallReceiver extends BroadcastReceiver {
You can’t perform that action at this time.