Skip to content

Instantly share code, notes, and snippets.

@hidroh
hidroh / adb-analytics-logcat.sh
Created June 16, 2016 04:38
Enable verbose logging for Google/Firebase Analytics
adb shell setprop log.tag.GAv4 DEBUG
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat *:S GAv4:V FA:V FA-SVC:V GoogleTagManager:V
@hidroh
hidroh / afterglow.css
Last active May 7, 2016 02:46
JSONView Chrome extension Afterglow theme https://github.com/gildas-lormeau/JSONView-for-Chrome
body {
white-space: pre;
font-family: monospace;
font-size: 13px;
background-color: #2e2e2e;
color: #d6d6d6;
}
a {
color: #b4c973;
@hidroh
hidroh / avd.sh
Last active May 6, 2024 02:31
Handy bash script to prompt for an Android virtual device (AVD) selection and launch it. Assuming that Android SDK has been set up and is in user PATH.
emulator -list-avds | cat -n
printf "Select AVD: "
read index
avd=$(emulator -list-avds | sed "${index}q;d")
echo "Selected $avd"
emulator -netdelay none -netspeed full -avd $avd
/*
* Copyright 2014 Chris Banes
*
* 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
@hidroh
hidroh / Request.java
Created March 8, 2015 03:48
Volley request class with support for array values in payload
import com.android.volley.AuthFailureError;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
/**
* Volley request class with support for array values in payload
*/
@hidroh
hidroh / NumericEditText.java
Last active November 16, 2020 14:05
Android numeric EditText widget that automatically formats input number
package io.github.hidroh.android.widget;
import android.content.Context;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.view.View;
import android.widget.EditText;
import org.apache.commons.lang3.StringUtils;