Skip to content

Instantly share code, notes, and snippets.

@hayukleung
hayukleung / HttpUploadFileHelper.java
Created May 28, 2017 14:03 — forked from D-clock/HttpUploadFileHelper.java
Android 上使用 HttpURLConnection 和 Socket 来实现HTTP协议上传文件功能
package com.clock.file;
import android.os.AsyncTask;
import android.text.TextUtils;
import android.util.Log;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
@hayukleung
hayukleung / CrashExceptionHandler.java
Created May 28, 2017 14:01 — forked from D-clock/CrashExceptionHandler.java
Android Java层崩溃日志捕获类
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Environment;
import android.os.Looper;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
@hayukleung
hayukleung / SystemUtils.java
Created May 28, 2017 14:00 — forked from D-clock/SystemUtils.java
Android系统实用工具类
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Environment;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
@hayukleung
hayukleung / BitmapUtils.java
Created May 28, 2017 14:00 — forked from D-clock/BitmapUtils.java
Android Bitmap常用工具类
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.media.ExifInterface;
import android.net.Uri;
import android.provider.MediaStore;
@hayukleung
hayukleung / HanziToPinyin.java
Created May 28, 2017 13:53 — forked from D-clock/HanziToPinyin.java
从Android4.2.2原生系统中提取出来的汉字转换成拼音的方案,同时兼容国产ROM
/*
* Copyright (C) 2009 The Android Open Source Project
*
* 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