Skip to content

Instantly share code, notes, and snippets.

View nandhakumargdr's full-sized avatar

Nandhakumar A nandhakumargdr

View GitHub Profile
import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';
import { MAT_DATE_LOCALE } from '@angular/material/core';
// TODO(mmalerba): See if we can clean this up at some point.
import * as _moment from 'moment';
// tslint:disable-next-line:no-duplicate-imports
// @ts-ignore
import { default as _rollupMoment, Moment, MomentFormatSpecification, MomentInput } from 'moment';
import { NgxMatDateAdapter } from '@angular-material-components/datetime-picker';
package com.rbs.priceverifier.utils.common
import android.content.Context
import android.content.SharedPreferences
import androidx.preference.PreferenceManager
import com.rbs.priceverifier.PriceVerifierApplication
import com.rbs.priceverifier.R
class SharedPreferencesManager {
companion object {
@nandhakumargdr
nandhakumargdr / gist:a7e3252d62cdc3179601be3dd6ace4f0
Created March 16, 2020 16:50 — forked from ianbarber/gist:5170508
Example Sign In activity for Google Sign-In on Android that retrieves an authorization code for use with server side authentication. See http://www.riskcompletefailure.com/2016/07/server-side-google-api-access-from.html for more background and links.
package com.example.anothersignintest;
import com.google.android.gms.auth.api.Auth;
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
import com.google.android.gms.auth.api.signin.GoogleSignInResult;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.OptionalPendingResult;
import com.google.android.gms.common.api.ResultCallback;