自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 Android application usage time

用電話撥打  *#*#4636#*#*就會出現一個神秘的 google 測試框架,在繼續深入追查會發現系統有 service 紀錄app的使用時間跟次數,詳細請看下面的source code。http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/1.

2013-09-28 02:34:36 590

原创 Android IDE

https://play.google.com/store/apps/details?id=com.aide.ui&hl=ensuper cool

2013-09-24 14:30:30 525

原创 Android objectAnimator

v.setPivotX(v.getWidth()* 1.05f); AnimatorSet rtn = new AnimatorSet(); rtn.play(ObjectAnimator.ofFloat(v, View.SCALE_X, sx, fx)).with( ObjectAnimator.ofFloat(v, View.SC

2013-09-18 11:08:39 667

原创 Android alertDialog

public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper( getActivity(), android.R.style.Theme_De

2013-09-17 17:06:18 488

原创 Android applications state

String pkgName = getPackageName(); boolean isBuildIn = false; boolean isSigned = false; boolean isDownload = false; try { PackageInfo pk

2013-09-16 17:21:25 909

原创 run android unit test

adb shell pm list instrumentationadb shell am instrument -w

2013-09-16 15:29:58 449

原创 get different locale application label

private boolean getApplicationLabel(ApplicationInfo target, Locale defaultLocale) throws NameNotFoundException { Resources appResource = null; Locale previousLocale = null;

2013-09-06 10:54:06 533

原创 Simple lru cache

public class LruCache extends LinkedHashMap {    private int mCacheSize = 30; // as default    private int mEvict = 0;    public AsusLruCache(int cacheSize) {        mCacheSize = c

2013-09-05 14:43:46 468

原创 Android 判斷 app 安裝在external storage

List packages; PackageManager pm = getPackageManager(); packages = pm.getInstalledApplications(0); for (ApplicationInfo p : packages) { boolean isInternal = (p.flag

2013-09-03 13:54:01 760

原创 Send email from Android device

Intent email = new Intent(Intent.ACTION_SEND); email.putExtra(Intent.EXTRA_EMAIL, new String[]{"emailYouWantToSend@gmail.com"}); email.putExtra(Intent.EXTRA_SUBJECT, "subject

2013-08-24 14:06:02 556

原创 Android 使用懸浮視窗

1. 在Activity 啟動 ServicestartService(new Intent(this, FloatingShortcutService.class)); android:name="com.yenhsun.floatingshortcut.FloatingShortcutService" />2. 加入 permission3. 設定 params

2013-08-04 00:21:45 1056

原创 Android unlock screen

import android.os.Bundle;import android.os.PowerManager;import android.app.Activity;import android.app.KeyguardManager;import android.app.KeyguardManager.KeyguardLock;import android.content.Conte

2013-08-04 00:12:06 1021

原创 Java equal

想必很多人都知道java 有個很方便的 method 在  Object 下面   .equal(Object) 但是猶記得很多書本或是教授教學時,都會使用錯誤的方法例如下面有一個簡單的 methodpublic boolean testEqual(String test) { return test.equal("abc");} 在很

2013-08-03 19:05:21 665

原创 拿到Android 手機 Sqlite 設置

import java.util.ArrayList;import android.app.Activity;import android.content.Context;import android.database.DatabaseUtils;import android.database.sqlite.SQLiteDatabase;import android.database.s

2013-08-03 19:03:48 520

原创 Android 拿到所有 Launcher app icon

Intent intent = new Intent(Intent.ACTION_MAIN, null);intent.addCategory(Intent.CATEGORY_LAUNCHER);List packages = pm.queryIntentActivities(intent,PackageManager.PERMISSION_GRANTED);for (ResolveInf

2013-08-03 18:48:44 1249

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除