Skip to content

Instantly share code, notes, and snippets.

@markus2610
markus2610 / AsyncTaskExecutionHelper.java
Created June 19, 2012 19:14 — forked from greenrobot/AsyncTaskExecutionHelper.java
Helper bringing back parallel execution for AsyncTask (you are no serial execution and pseudo threading wimp, right?). Uses level 11 APIs when possible.
package de.greenrobot.util;
import java.util.concurrent.Executor;
import android.os.AsyncTask;
import android.os.Build;
/**
* Uses level 11 APIs when possible to use parallel/serial executors and falls back to standard execution if API level
* is below 11.
import org.gradle.api.DefaultTask
import org.gradle.api.Project
import org.gradle.api.plugins.BasePlugin
/**
* apply this plugin after doing all dependency and repo stuff. It will create two idea 'libraries' per subproject
* and add them to your .iml files
*
* Forked from https://gist.github.com/360092
*
@jrudolph
jrudolph / .gitignore
Created December 5, 2011 17:51
Dalvik dexopt failure
/bin
/gen
@DDRBoxman
DDRBoxman / create_images
Created November 2, 2011 03:05
Script to scale and create Android images at the correct dpi levels
#!/bin/bash
#Requires ImageMagick to be installed.
#Some builds of ImageMagick on OSX have problems generating the images correctly.
#This script scales and creates images at the correct dpi level for Android.
#It gets placed in a folder called res/drawable/source_images/ in your #Android project along with all your svg files.
#When creating svg files set the image size to the size that you want your hdpi images to be.
#To use simply run the create_images script from its folder and it will generate images for all the svg files.
@poutyface
poutyface / gist:1119105
Created August 1, 2011 22:00
Android RegisterNatives
#include <stdio.h>
#include <android/log.h>
#include "calvals.h"
#define EXPORT __attribute__((visibility("default")))
#define LOG_TAG "native"
#define log_info(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
#define log_error(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)