Skip to content

Instantly share code, notes, and snippets.

View hendrawd's full-sized avatar
☺️
Happy

Hendra Wijaya Djiono hendrawd

☺️
Happy
View GitHub Profile
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;
@hendrawd
hendrawd / ProxiedHurlStack.java
Last active October 3, 2023 09:52
Use proxy with Volley
import com.android.volley.toolbox.HurlStack;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.URL;
/**
* @author hendrawd on 6/29/16
@hendrawd
hendrawd / OkHttp3Stack.java
Last active December 5, 2016 18:47
An OkHttp3Stack for Volley library to boost the performance of Volley itself
import com.android.volley.AuthFailureError;
import com.android.volley.Request;
import com.android.volley.toolbox.HttpStack;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.ProtocolVersion;
import org.apache.http.StatusLine;
import org.apache.http.entity.BasicHttpEntity;
import org.apache.http.message.BasicHeader;
@hendrawd
hendrawd / DuAdHelper.java
Last active June 24, 2016 06:41
An helper class to load interstitial and overwall DU AD
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import com.duapps.ad.AbsInterstitialListener;
import com.duapps.ad.InterstitialAd;
import com.duapps.ad.offerwall.ui.OfferWallAct;
/**
* @author hendrawd on 6/24/16
@hendrawd
hendrawd / CheckableImageView.java
Last active September 3, 2022 07:33
An image view that checkable
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.Checkable;
import android.widget.ImageView;
/**
* @author hendrawd on 6/23/16
*/
public class CheckableImageView extends ImageView implements Checkable {
@hendrawd
hendrawd / TimeUtil.class
Created November 12, 2015 05:50
A Java class with a method that can return relative time span string with Indonesian language(bahasa)
package com;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
import java.util.concurrent.TimeUnit;
/**
* Created by hendrawd on 11/12/15.