Skip to content

Instantly share code, notes, and snippets.

View kasim1011's full-sized avatar
:octocat:
Kasim Rangwala (kasim1011)

Kasim Rangwala kasim1011

:octocat:
Kasim Rangwala (kasim1011)
View GitHub Profile
@kasim1011
kasim1011 / SimpleCustomChromeTabsHelper.java
Last active September 9, 2015 09:40 — forked from NikolaDespotoski/SimpleCustomChromeTabsHelper.java
Simple Custom Tab Helper for Custom Tab support libary
import android.app.Activity;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.Bitmap;
import android.net.Uri;
/*
* Copyright (C) 2014 skyfish.jy@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@kasim1011
kasim1011 / PDFUtil.java
Created March 12, 2018 13:35 — forked from tejpratap46/PDFUtil.java
Android Generate PDF from view
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.pdf.PdfDocument;
import android.graphics.pdf.PdfRenderer;
import android.os.AsyncTask;
import android.os.Build;
import android.os.ParcelFileDescriptor;
import android.util.Log;
@kasim1011
kasim1011 / AesSecretKey.kt
Created August 12, 2018 11:26
Encrypt / Decrypt String using AES256 on Android
package io.gripxtech.odoojsonrpcclient.core.utils
import android.util.Base64
import java.util.*
import javax.crypto.Cipher
import javax.crypto.spec.IvParameterSpec
import javax.crypto.spec.SecretKeySpec
private const val algorithm = "AES"
private const val tokenKey = "fqJfdzGDvfwbedsKSUGty3VZ9taXxMVw"