Skip to content

Instantly share code, notes, and snippets.

Miguel Aragues Maragues

  • Zaragoza, Spain
Block or report user

Report or block Maragues

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ImmediateRxSchedulersOverrideRule.java
/**
* This rule registers SchedulerHooks for RxJava and RxAndroid to ensure that subscriptions
* always subscribeOn and observeOn Schedulers.immediate().
* Warning, this rule will resetProcedureStatus RxAndroidPlugins and RxJavaPlugins after each test so
* if the application code uses RxJava plugins this may affect the behaviour of the testing method.
* <p>
*
* See https://medium.com/@fabioCollini/testing-asynchronous-rxjava-code-using-mockito-8ad831a16877#.ahj5h7jmg
* See https://github.com/fabioCollini/TestingRxJavaUsingMockito/blob/master/app/src/test/java/it/codingjam/testingrxjava/TestSchedulerRule.java
*/
@Maragues
Maragues / Picasso idlingresource.md
Last active Aug 10, 2016
Implementation and usage of an IdlingResource that waits for Picasso actions to finish.
View Picasso idlingresource.md

Note that the file lives in the package as Picasso. Otherwise we don't have access to targetToAction

package com.squareup.picasso;

public class PicassoIdlingResource implements IdlingResource, ActivityLifecycleCallback {
  protected ResourceCallback callback;

  WeakReference<Picasso> picassoWeakReference;
@Maragues
Maragues / DataDroidOkHttp
Created Oct 1, 2013
DataDroid + OkHttp Integration through reflection
View DataDroidOkHttp
public static ConnectionResult execute(...){
[...]
URL url = null;
String outputText = null;
switch (method) {
case GET:
case DELETE:
String fullUrlValue = urlValue;
if (paramBuilder.length() > 0) {
View build.gradle
// additional required configuration to hook into the build script
android {
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
}
You can’t perform that action at this time.