Skip to content

Instantly share code, notes, and snippets.

View bmoliveira's full-sized avatar
🏠

Bruno Oliveira bmoliveira

🏠
View GitHub Profile
@bmoliveira
bmoliveira / Dependencies.kt
Created February 16, 2018 13:22
Android gradle Kotlin dependencies file example
object Versions {
val kotlin = "1.2.21"
val supportLib = "27.0.2"
val buildTools = "27.0.2"
val minSDK = 19
val targetSDK = 26
val compileSDK = 26
val versionCode = 1
val versionName = "1.0"
@bmoliveira
bmoliveira / bintray-deploy.gradle
Last active February 16, 2018 13:30
BintrayUpload via providing properties
// This script will configure the deploy to bintray with aar
// Of an android-library using kotlin project
// Simply by providing the .property files
// all boilerplate code is here.
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'org.jetbrains.dokka-android'
apply plugin: 'maven-publish'
@bmoliveira
bmoliveira / Android GCM Token fetcher
Last active August 29, 2015 14:22
Android Helper to get GCM Token from Play services, with fluent api callback registration
import android.content.Context;
import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.support.annotation.Nullable;
import android.util.Log;
import android.util.Pair;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.gcm.GoogleCloudMessaging;
@dlew
dlew / themes-debug.xml
Last active March 1, 2024 15:46
With the new theming in AppCompat, a lot of assets are tinted automatically for you via theme attributes. That has often led me to wonder "where the hell did this color come from?" You can replace your normal theme with this debug theme to help figure out the source of that color.
<!-- You can change the parent around to whatever you normally use -->
<style name="DebugColors" parent="Theme.AppCompat">
<!-- System colors -->
<item name="android:windowBackground">@color/__debugWindowBackground</item>
<item name="android:colorPressedHighlight">#FF4400</item>
<item name="android:colorLongPressedHighlight">#FF0044</item>
<item name="android:colorFocusedHighlight">#44FF00</item>
<item name="android:colorActivatedHighlight">#00FF44</item>
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)