- 博客(171)
- 资源 (4)
- 收藏
- 关注
原创 Android: LOCAL_SDK_VERSION := current
Android.mk里添加 LOCAL_SDK_VERSION := current 后不能使用@hide API
2013-06-17 11:13:29
6993
原创 Android: 判断service运行状态
public static boolean isServiceRunning(Context context) { ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); for (RunningServiceInfo service : ma
2013-05-29 10:55:48
6775
原创 Android: project UrlImageViewHelper
https://github.com/koush/UrlImageViewHelperUsageUrlImageViewHelper will automatically download and manage all the web images and ImageViews. Duplicate urls will not be loaded into memory
2013-05-28 13:39:17
3596
原创 Android: Bitmap OutOfMemory
//decodes image and scales it to reduce memory consumption private Bitmap decodeFile(File f){ try { //Decode image size BitmapFactory.Options o = new BitmapFactory.
2013-05-23 17:41:29
2591
原创 Android: 判断网络状态
判断当前Wifi或Ethernet连接状态: public static boolean isNetworkConnected(Context context) { ConnectivityManager cm = (ConnectivityManager) context .getSystemService(Context.CONNECTIVITY_SERVICE); Net
2013-04-27 17:51:18
3072
原创 Android: ImageView animations
ImageView view = ((ImageView) getView().findViewById(R.id.image)); view.startAnimation(AnimationUtils.loadAnimation(getActivity(), R.anim.fade_in)); view.setImageBitmap(mBitmap);
2013-04-27 17:35:50
2512
原创 Git: 修改提交记录
git rebase -i xxxpick xxxx修改为 edit xxxxgit commit --amend修改提交记录git rebase --continue搞定,重新push
2013-04-27 17:33:57
2397
原创 Android: 通过URL下载文件
URL url = new URL(urlString);File tempFile = null;tempFile = File.createTempFile("cache", ".tmp", new File(Environment.getExternalStorageDirectory().toString()));boolean downloaded = DownloadUtils.
2013-04-11 17:18:06
3698
原创 Android: ImageView and Bitmap
imageView.setImageBitmap(bitmap)从res获得Bitmap:Bitmap bitmap= BitmapFactory.decodeResource(getResources(), R.drawable.xxx);从ByteArray获得Bitmap:Bitmap bitmap= BitmapFactory.decodeByteArr
2013-04-11 17:12:01
2823
原创 Android: ApiHelper
/* * Copyright (C) 2012 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. * Yo
2013-04-08 16:31:19
3846
原创 Android: notifications
android-sdk/docs/guide/topics/ui/notifiers/notifications.htmlNotificationsIN THIS DOCUMENTNotification Display ElementsNormal viewBig viewCreating a NotificationReq
2013-04-08 16:13:33
3931
原创 Android: SharedPreferences OP
SharedPreferences prefs = Utils.getSharedPreferences(context); boolean autostart = prefs.getBoolean(SettingsPreferences.KEY_BOOT_CFG, false); public static SharedPreferences getSharedPreferences(C
2013-04-08 16:09:41
2571
转载 Android: android 如何预置APK
ZZ: http://blog.youkuaiyun.com/sergeycao/article/details/8198205一、如何将带源码的APK预置进系统?1) 在 packages/apps 下面以需要预置的 APK的 名字创建一个新文件夹,以预制一个名为Test的APK 为例2) 将 Test APK的Source code 拷贝到 Test 文件夹下,删除 /bin
2013-03-19 09:43:02
2594
原创 Android: API Levels
import android.os.Build;private static final int SDK_VERSION = Build.VERSION.SDK_INT;Platform VersionAPI LevelVERSION_CODENotesAndroid 4.2, 4.2.217JELLY_BEAN_
2013-03-18 15:29:49
2155
原创 Android: 监听解锁事件
Intent.ACTION_USER_PRESENT"android.intent.action.USER_PRESENT"
2013-03-15 16:18:28
3065
原创 Android: DroidAirPlay Project
https://github.com/pentateu/DroidAirPlayDroidAirPlay===========Rafael Almeida (rafael@iswe.co.nz)July 2012Overview---------------The ideia is to develop a AirPlay Receiver that runs
2013-03-15 14:22:28
4369
原创 Android: AirReceiver Project
https://github.com/fgp/AirReceiverAirReceiver===========Florian G. Pflug May 2011Overview--------AirReceiver is an AirPort Express emulator, i.e. it allows streaming audiofro
2013-03-15 14:17:15
3685
原创 Git: 合并几个commit为一个commit
git log:Commit ACommit BCommit CCommit DCommit O比如要合并 A B C D 为一个commitgit rebase -i Commit O在里面把 B C D 前面设s退出rebase, 编辑commit这个时候就成了Commit XCommit O合并 branch
2013-02-22 18:50:43
25843
原创 Android: 百度个人云存储
http://developer.baidu.com/wiki/index.php?title=docs/pcs百度个人云存储(PCS)免费大空间、海量存储。支持文件、目录及缩略图管理。支持结构化数据存储 。多终端自动同步。轻松的文件分享功能。专业的技术支持团队。基于多种平台提供丰富的SDK。PCS提供了多种SDK和Demo样例,帮助您快速进行应用开发。
2013-01-31 18:33:24
5051
原创 Linux: hrtimer 用法
hrtimer = high res timer内核为高精度定时器重新设计了一套软件架构,它可以为我们提供纳秒级的定时精度,以满足对精确时间有迫切需求的应用程序或内核驱动,例如多媒体应用,音频设备的驱动程序等等。以下的讨论用hrtimer(high resolution timer)表示高精度定时器。#include static struct hrtimer hrti
2013-01-30 16:04:15
5251
1
原创 Android: eclipse 使用@hide API
编译生成的out\target\common\obj\JAVA_LIBRARIES\framework_intermediates\classes.jar添加到项目Libraries,并且在Order and Export 中调整classes.jar在系统API之前即可
2013-01-24 14:15:44
1316
原创 Android: 第三方jar打包进APK
Android.mkLOCAL_PATH:= $(call my-dir)include $(CLEAR_VARS)LOCAL_MODULE_TAGS := optionalLOCAL_SRC_FILES := $(call all-subdir-java-files)LOCAL_PACKAGE_NAME := ACharDemoLOCAL_CE
2013-01-22 16:17:44
1320
转载 Android: Data Backup
Android开发指南(37) —— Data Backup 前言 本章内容为Android开发者指南的 Framework Topics/Data Storage/Data Backup章节,译为"数据备份",版本为Android 4.0 r1,翻译来自:"呆呆大虾",欢迎访问他的微博:"http://weibo.com/popapa",再次感谢"呆呆大虾" !期待
2012-12-26 13:52:30
1017
转载 Android: dumpsys
http://www.2cto.com/kf/201203/125340.html首先看一下dumpsys有哪些功能:dumpsys 用来给出手机中所有应用程序的信息,并且也会给出现在手机的状态。dumpsys [Option] meminfo 显示内存信息 cpuinfo 显示CPU信息
2012-12-19 14:41:57
1030
原创 Android: git 统计
git shortlog -s -n1) Kernel TOP10 10475 Linus Torvalds 3752 David S. Miller 3393 Ingo Molnar 3073 Takashi Iwai 2605 Al Viro 2254 Russell King 2247 Paul Mundt 2196 Tejun Heo
2012-12-13 17:22:47
991
原创 Android: frameworks\base\core\java\android\os\FileUtils
/* * Copyright (C) 2006 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. * Yo
2012-12-03 16:34:21
2860
原创 Android: ACTION_SCREEN_ON ACTION_SCREEN_OFF 为什么Manifest注册了却不能接收
frameworks\base\services\java\com\android\server\PowerManagerService.java mScreenOnIntent = new Intent(Intent.ACTION_SCREEN_ON); mScreenOnIntent.addFlags( Intent.FLAG_
2012-11-16 17:13:00
5955
转载 Android: Tablet App Quality Checklist
http://developer.android.com/distribute/googleplay/quality/tablet.htmlQuicknavDesignDevelopDistributeLinksGoogle Play Developer ConsoleAndroid Devel
2012-10-15 18:17:32
1996
原创 Android: Java中的delay
/** * Sleep for a period of time. * @param secs the number of seconds to sleep */ private static void nap(int secs) { try { Thread.sleep(secs * 1000); }
2012-09-17 16:54:31
3694
原创 Android: 修改ramdisk.img
cp ../ramdisk.img ramdisk.cpio.gzgzip -d ramdisk.cpio.gzmkdir tmpcd tmpcpio -i -F ../ramdisk.cpio(make changes in /tmp)cpio -i -t -F ../ramdisk.cpio | cpio -o -H newc -O ../ramdisk_new.cpiocd .
2012-09-13 14:05:45
952
转载 Android: framework/Split off some packages to a new file
https://github.com/CyanogenMod/android_frameworks_base/commit/854f6f736b90d33b59b5a85bcecf72a416c43b7dframework: Split off some packages to a new fileframeworks.jar is now hitting the maximu
2012-09-10 17:26:14
2774
原创 Android: wakelock
private PowerManager.WakeLock mSuspendWakeLock;mSuspendWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "WifiSuspend");mSuspendWakeLock.setReferenceCounted(false);
2012-09-10 16:38:26
894
转载 Android: An introduction to the Edify (Updater-Script) language
An introduction to the Edify (Updater-Script) language 2011-11-08 21:53:30
2012-08-22 16:26:51
1646
转载 Android: WiFi direct
http://www.uns.org.tw/node/651無線網路的應用大升級:Wi-Fi Direct2011-05-30 23:41 發表技術論壇Post by InDeepNight自從網際網路經過了Web 2.0的洗禮之後,又歷經了智慧型手機的大爆發,在都會區裡幾乎四處都能夠找到能夠連接上網的熱點(先不論是否免費
2012-07-11 16:54:47
4056
原创 Android: Syncing to the Cloud
http://developer.android.com/training/cloudsync/index.htmlSyncing to the CloudGet started ›Syncing with App EngineBy providing powerful APIs for internet connectivity, the
2012-06-05 14:22:43
982
原创 Android: Transferring Data Without Draining the Battery
http://developer.android.com/training/efficient-downloads/index.htmlTransferring Data Without Draining the BatteryGet started ›Optimizing Downloads for Efficient Network Access
2012-06-05 14:03:58
934
原创 Android: 判断网络连接状态及连接类型
// Checks the network connection and sets the wifiConnected and mobileConnected // variables accordingly. private void updateConnectedFlags() { ConnectivityManager connMgr =
2012-06-04 14:58:43
5794
1
2.3截屏全部源码+APK+so
2011-12-12
文件管理apk示例代码
2011-11-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人