Skip to content

Instantly share code, notes, and snippets.

Flavien Laurent flavienlaurent

Block or report user

Report or block flavienlaurent

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
flavienlaurent /
Last active Jan 2, 2016
How to retry request with http-request lib
public interface HttpRequestBuilder {
public HttpRequest build();
HttpRequestBuilder builder = new HttpRequestBuilder {
public HttpRequest build() {
return HttpRequest.get("uri").acceptJson().userAgent("useragent");
flavienlaurent /
Last active Dec 28, 2015
Retrieve a String resource by name
public class MainActivity extends ActionBarActivity {
private static final String TAG = "MainActivity";
private static final String SERVER_PREFIX = "SERVER_";
protected void onCreate(Bundle savedInstanceState) {
flavienlaurent /
Last active Dec 27, 2015
Implementing a DocumentsProvier
import android.database.MatrixCursor;
import android.os.Bundle;
import android.provider.DocumentsContract;
public class DocumentsCursor extends MatrixCursor {
private Bundle mExtras;
public DocumentsCursor(String[] columnNames, int initialCapacity) {
super(columnNames, initialCapacity);
View installapk.bat
@echo off
adb install -r %1
package org.boundbox.sample;
import java.lang.String;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import org.boundbox.BoundBoxException;
import android.content.Context;
import android.util.AttributeSet;
import android.view.ViewGroup;
public class MyCustomViewGroup extends ViewGroup {
public MyCustomViewGroup(Context context) {
// TODO Auto-generated constructor stub
package thisisapackage;
import java.util.List;
public class A {
public void doIt(List<String> strings) {
// do it
You can’t perform that action at this time.