Skip to content

Instantly share code, notes, and snippets.

View chimbori's full-sized avatar

Chimbori chimbori

View GitHub Profile
# Chimbori Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made
available by Chimbori.
In order to clarify the intellectual property license granted with Contributions from any person or
entity, Chimbori must have a Contributor License Agreement ("CLA") on file that has been signed by
each Contributor, indicating agreement to the license terms below. This license is for your
protection as a Contributor as well as the protection of Chimbori; it does not change your rights to
use your own Contributions for any other purpose. This CLA sets out the terms governing any source
@chimbori
chimbori / BillingManager.java
Created January 23, 2017 16:49
In-App Billing implementation for Google Play, using Google API directly
package your.app.billing;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
import android.content.ServiceConnection;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
public class BitmapUtils {
private BitmapUtils() {
}
public static Bitmap padBitmap(Bitmap bitmap, int borderSize) {
Bitmap bmpWithBorder = Bitmap.createBitmap(