This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adb shell am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///mnt/sdcard/Music |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
maven { url 'https://plugins.gradle.org/m2/' } // mirrors jcenter() and mavenCentral() | |
} | |
dependencies { | |
// Android gradle plugin | |
classpath 'com.android.tools.build:gradle:1.5.0' | |
// Google error-prone | |
classpath 'net.ltgt.gradle:gradle-errorprone-plugin:0.0.8' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sourceSets { | |
integrationTest { | |
java.srcDir file('src/integration-test/java') | |
resources.srcDir file('src/integration-test/resources') | |
} | |
} | |
configurations { | |
integrationTestCompile.extendsFrom testCompile | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
import android.app.Dialog; | |
import android.content.DialogInterface; | |
import android.content.DialogInterface.OnCancelListener; | |
import com.google.android.gms.common.ConnectionResult; | |
import com.google.android.gms.common.GoogleApiAvailability; | |
/** | |
* Google Play Services utility class. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.util.Log; | |
import com.google.android.gms.analytics.ExceptionParser; | |
/** | |
* Custom Analytics Class to display enough debug information in the console. | |
* | |
* @author <a href="mailto:jaredsburrows@gmail.com">Jared Burrows</a> | |
*/ | |
public final class AnalyticsExceptionParser implements ExceptionParser { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Optimization needs to be turned on to remove logs | |
-assumenosideeffects class android.util.Log { | |
public static boolean isLoggable(java.lang.String, int); | |
public static int v(...); | |
public static int i(...); | |
public static int w(...); | |
public static int d(...); | |
public static int e(...); | |
public static int wtf(...); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author <a href="mailto:jaredsburrows@gmail.com">Jared Burrows</a> | |
*/ | |
@Module | |
public class NetModule { | |
/** | |
* Date format for requests. Eg. 2016-06-19T13:07:45.139Z | |
*/ | |
private static final String DATE_FORMAT = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS'Z'"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A.h | |
class A { | |
public: | |
int var; | |
class Builder; | |
A(Builder* builder); | |
int getVar(); | |
Builder* newBuilder(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.junit.After; | |
import org.junit.Before; | |
import rx.Scheduler; | |
import rx.android.plugins.RxAndroidPlugins; | |
import rx.android.plugins.RxAndroidSchedulersHook; | |
import rx.schedulers.Schedulers; | |
/** | |
* JUnit Tests. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.os.Bundle; | |
import com.google.firebase.analytics.FirebaseAnalytics; | |
import com.google.firebase.crash.FirebaseCrash; | |
import com.orhanobut.logger.Logger; | |
/** | |
* https://developers.google.com/analytics/devguides/collection/android/v4/advanced?hl=es | |
* https://github.com/google/iosched/blob/0a90bf8e6b90e9226f8c15b34eb7b1e4bf6d632e/android/src/main/java/com/google/samples/apps/iosched/util/java | |
* https://github.com/google/iosched/blob/cf1f30b4c752f275518384a9b71404ee501fc473/android/src/main/java/com/google/samples/apps/iosched/ui/BaseActivity.java |