Skip to content

Instantly share code, notes, and snippets.

@Gopinathp
Gopinathp / designer.html
Created September 1, 2014 14:42
designer
<link rel="import" href="../google-map/google-map-directions.html">
<link rel="import" href="../cool-clock/cool-clock.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../notification-elements/notification-alert.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../yt-video/yt-search-video.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
@Gopinathp
Gopinathp / designer.html
Last active August 29, 2015 14:23
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-ajax/core-ajax.html">
@Gopinathp
Gopinathp / Common.java
Created September 20, 2012 10:32
A public static method to figure out 50 Friends with Android phones and send them apprequests
public static void fbShareThisAppForAndroidUsers(final Facebook mFacebook, final Activity mActivity) {
AsyncTask<Object, Object, Object> asyncTask = new AsyncTask<Object, Object, Object>() {
private WeakReference<Activity> weakActivity;
private Facebook facebook;
@Override
protected Object doInBackground(Object... params) {
try {
facebook = mFacebook;
@Gopinathp
Gopinathp / Common.java
Created October 10, 2012 05:07
copy Android app's private files to sdcard
package com.tringtringlabs.experiments;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import android.app.Activity;
@Gopinathp
Gopinathp / AnyActivity.java
Created October 10, 2012 05:30
On any typical android activity, in which you want to have copy app private files to sdcard, wire the Common.java code to handle the file copying
private static final int MENU_COPY_FILES = 99;
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_kid_feed, menu);
if (BuildConfig.DEBUG) {
menu.add(Menu.NONE, MENU_COPY_FILES, Menu.NONE, "Copy App Files to sdcard");
}
return true;
}
@Gopinathp
Gopinathp / GLogger.java
Created October 10, 2012 05:15
A wrapper around the Android logger which can skip debug logs on production builds automatically.
package com.tringtringlabs.mykidstory.components;
/**
* @author gopinath
* A wrapper around the regular Android logger which will disable debug logs in production automatically.
*/
import android.util.Log;
import com.tringtringlabs.mykidstory.App;
import com.tringtringlabs.mykidstory.BuildConfig;
@Gopinathp
Gopinathp / designer.html
Created November 26, 2015 10:00
designer
<link rel="import" href="../paper-radio-group/paper-radio-group.html">
<link rel="import" href="../paper-radio-button/paper-radio-button.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@Gopinathp
Gopinathp / L.java
Last active December 19, 2015 09:19
GreenLogger - Smart Logger for Android. 1. Turns off debug/verbose logs on production builds of the app. 2. Logs for the entire app using a single TAG "GreenLogger" which you can modify if you wish to. 3. Helps in easy log filtering on production devices. Filter by "GreenLogger" on adb logcat. (Usage: adb logcat | grep GreenLo) 4. Convenient met…
package com.gopinath.android.util;
import android.content.SharedPreferences;
import android.util.Log;
import com.google.gson.Gson;
/**
* GreenLogger class Features: <br>
* 1. Logging is made easy and manageable <br>
@Gopinathp
Gopinathp / greenloggersampleusages.java
Last active December 19, 2015 09:28
Usage of GreenLogger
// To print an exception in the console in debug builds only and to skip the printing in release builds.
// Instead of e.printStacktrace() use GreenLogger.
L.print(e);
// To print a sharedpreferences file in the console in debug builds only and to skip the printing in release builds.
L.print(mPrefs);
// To print any message only in debug, use
String message = "Your debug time only verbose message";
L.v(message);
@Gopinathp
Gopinathp / ffmpeg-jni-cmakelist.txt
Created October 25, 2017 11:29
Transient dependencies are bundled into the APK but not linked in the jni wrapper
#
# Copyright (C) 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
#