自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(110)
  • 资源 (2)
  • 收藏
  • 关注

原创 Android加固调研

              简介              基本概念                     APK结构                     Dex结构                     APK打包过程                     APK加载过程                     Android JNI机制              常用破...

2018-10-12 11:48:46 1489

原创 应用分享:GIF压缩助手

应用描述将过大的GIF图片压缩成小的GIF图片,便于微信自定义表情的添加,图片上传等操作。 可以自定义设置图片大小缩小比例,每张图像的图像质量,和对原GIF图像的采样间隔应用截图初始界面选择图片压缩设置正在压缩压缩结束应用初衷写这个小应用是因为手机添加微信表情的时候,总是提示我文件过大,无法添加表情,一般手机添加表情超过三五百k不定就没法添加了,电脑可以添加1m以下的,貌似是这样。 所以写了这个

2016-01-30 13:24:14 1294

原创 个人应用分享:短信转家

功能简介关键字: 短信转发 短信 转发 SMS 网络转发描述: 通过网络免费转发你的手机收到的短信到另一个手机,从此轻松出门。简介:不同于市场上常用的通过运营商的短信功能进行转发,该应用通过网络进行转发,完全免费,适用于不想携带多个手机,但是又不想错过验证码等短信的用户,也适用于人在国外,没有开漫游的手机留在国内的用户。从此不再错过任何短信 下载页:http://smsxfer.bmob.cn

2016-01-30 13:11:25 548 1

原创 几个项目中用到的代码片段

打印调用栈LogUtils.e("CHENZHENG", Log.getStackTraceString(new Throwable()));监听网络变化1,注册监听器: mConnectivityManager = (ConnectivityManager)context .getSystemService(Context.CONNECTIVITY_SERVICE)

2016-01-30 12:17:26 464

原创 将下载的图片加入media检索库

将下载的图片加入media检索库

2016-01-30 12:01:10 386

原创 Android4.4之后SD卡存储方案

由于Android4.4之后,Android限制了第三方应用在SD卡中的公用目录的写权限,所以我们无法再公用目录创建文件夹,写入文件,但是读操作不受限制,(系统应用如文件管理器,或者root用户不除外)第三方应用想要写入SD卡,有以下几种方案:1,Context.getExternalFilesDir()获取应用的专有目录如:/storage/sdcard1/Android/data/com.x

2016-01-30 11:47:33 1877

原创 Android常用工具类之 Log工具类

Log工具类推荐一个开源的工具: https://github.com/MustafaFerhan/DebugLog 源码只有一个类DebugLog.java 打印出来的内容也很简洁,但是很方便: 使用方法:DebugLog.e("I am an error log");打印效果:4959-4959/com.example.pc.myapplication E/MainActivity.ja

2015-12-17 15:15:31 453

转载 Gradle教程

转发自:http://www.cnblogs.com/CloudTeng/p/3417762.htmlGradle 快速入门...2创建Task的多种方法...6读懂Gradle.9增量式构建...13自定义Property.15使用Java Plugin.18依赖管理...22构建多个Project.24

2015-12-15 15:50:11 517

原创 Android常用工具类之 Toast工具类

编写Toast工具类的必要性Toast作为Android的一种用户提醒方式被广泛应用在Android应用中,但是Toast的使用却有些问题: 1. 调用代码繁琐: 首先需要调用静态方法makeText(Context context, CharSequence text, @Duration int duration)来创建一个Toast对象。 其次还要记得调用show函数来弹出该toast

2015-12-04 17:47:12 1273

原创 Android 通过短链接,获取长连接

package com.example.httptest;import android.app.Activity;import android.os.Bundle;import android.os.Handler;import android.os.Message;import android.view.View;import android.widget.Button;impo

2015-08-18 15:47:54 792

原创 ImageView 长按保存

效果图: MyActivitypackage com.example.AndroidTest;import android.app.Activity;import android.app.AlertDialog;import android.content.Context;import android.content.DialogInterface;import android.g

2015-07-21 09:36:32 2220 2

原创 Android中的设计模式-适配器模式

适配器模式从名字上就可以看出适配器是为了针对接口不匹配的情况,而做出的兼容方法, 假设我们有一个已经存在的类Adaptee,其中有一些已经存在并实现好的方法methodA。但是客户不希望调用这个类,而是希望调用一个特定的接口例如Target接口。 于是如果想要调用Adaptee.methodA()方法,创建一个Adapter类实现客户要求的Target接口,Target接口中假设客户希望调用ca

2015-05-14 10:59:09 589

原创 Android中的设计模式-单例模式

Android中的设计模式-单例模式单例模式算是比较常用的模式,在Java中如果想要一个JVM中只存在某个类的一个实例,就需要使用到单例模式,而只存在一个实例的需求一般是因为: 1,对象实例比较大和复杂,创建开销很大。 2,只需要一个实例来维护整个功能的流程与交互。 例如Android中的电话应用启动时,对于单卡单待的电话,只创建一个Phone对象,用来管理RIL,CallTracker,Se

2015-05-14 10:51:01 626

原创 Android中的设计模式-观察者模式

观察者模式观察者模式,有时又被称为发布-订阅Subscribe>模式、模型-视图View>模式、源-收听者Listener>模式或从属者模式。一个目标物件管理所有相依于它的观察者物件,并且在它本身的状态改变时主动发出通知。 观察者模式算是一个比较常用的模式了,使用上就像是订阅RSS,当有新的新闻更新,接受订阅的主题就会向每一个订阅者发送消息,这里的发送消息一般是调用订阅者的已经定义好的函数,如On

2015-04-10 14:57:19 571

原创 Android中的设计模式-抽象工厂模式

抽象工厂模式(Abstract Factory)先上类图吧,自己懒得画了,找了个现成的 抽象工厂的引入是根据需求而产生的,说到这里先要提到一个名字—产品族(Product Family),还是以生产汽车为例,我想要一个上汽的汽车工厂能够同时生产一款MPV,一款SUV和一款Sedan,那比如说它就是上海通用别克的工厂啦,可以生产MPV GL8,生产SUV 昂科威,可以生产Sedan 君威,这几款

2015-04-10 14:45:10 1020

原创 Android中的设计模式-工厂方法模式

简单工厂&工厂方法一直以来总是分不清简单工厂,工厂方法,抽象工厂这三个设计模式的区别,倒不是不理解其区别,而是总是记忆混淆,傻傻分不清楚,所以再重新总结一下区别,并记录下来,下次再混淆时,可以拿出来看看。这节先说简单工厂和工厂方法,下一节再说抽象工厂。工厂方法中其实就包含了简单工厂,简单工厂也称为静态工厂方法,简单工厂模式(Simple Factory)类图 简单工厂模式又称为静态工厂方法模式,是

2015-04-10 14:23:59 1118

原创 Android中的设计模式-状态模式

状态模式说明“状态模式允许一个对象在其内部状态改变的时候改变其行为。这个对象看上去就像是改变了它的类一样。” –《JAVA与模式》 管理者持有多种状态,状态切换后,管理者调用Handle方法时,间接调用状态类中的Handle方法,从而根据当前状态的不同,就可以表现出不同的结果。状态模式类图状态模式使用示例例如一个变形金刚,假设它有3中状态:汽车状态,人形状态,飞机状态。 不同的状态进行战斗的时候,

2015-04-10 00:11:34 1416

原创 Telephony单元测试分析

Telephony单元测试分析总览 Name Location Description libmock_ril hardware\ril\mock-ril A mock ril like SecRil. mockrilcontroller frameworks\opt\telephony\mockril Communicate with

2015-04-02 10:36:14 1515

原创 Telephony如何为第三方应用提供服务

TelephonyAIDL为第三方应用提供服务。在frameworks/base/telephony/java/com/android/internal/telephony中有几个aidl文件, -rw-r--r-- 1 chenzheng chenzheng 1537 2013-03-25 23:19 IPhoneStateListener.aidl -rw-r--r-- 1 chenzhen

2015-03-31 13:45:37 1624

原创 Telephony Call状态图解

CS call的工作状态图解在分析Telephony的工作流程时,总是接触到各种状态的转换,并且不同种类的状态很容易让人混淆,不知所措,本文根据工作中的记忆,根据图示,简要分析一下Telephony中的各种状态。Telephony中的几种状态。图1,DriverCall State/ Call State/ Phone State DriverCall StateDriverCall State是

2015-03-31 11:31:35 1408

翻译 [翻译]在API level 17以下时正确显示适应边界的ImageView

[翻译]在APIlevel 17以下时正确显示adjustViewBounds的ImageViewCorrect the ImageView’s adjustViewBounds behaviour on API Level 17 and below with AdjustableImageView 原文地址: http://inthecheesefactory.com/blog/correct

2015-03-30 15:59:37 1386

翻译 [翻译]如何安装ACRA-一个Android应用Crash跟踪系统

[翻译]如何安装ACRA-一个Android应用Crash跟踪系统—在你自己的服务器上How to setup ACRA, an Android Application Crash Tracking system, on your own host 原文地址: http://inthecheesefactory.com/blog/how-to-install-and-use-acra-andro

2015-03-30 15:12:29 3941 1

原创 Mac 使用Source Insight (借助Wine For Mac)

下载Wine for Machttp://sourceforge.net/projects/darwine/ 如果在百度直接搜的话,是另一个网址,这个才是正确的版本,如果下载有问题,可以下载我再百度云的分享。所有需要用到的软件的百度云链接Wine安装下载下来的是一个DMG文件,双击。 屏幕快照 2015-03-29 下午4.23.10.png 屏幕快照 2015-03-2

2015-03-29 22:50:49 11556 2

原创 EventBus的使用

EventBus使用在介绍EventBus之前先捋顺以下Android自带的应用内通信方式有哪些?Android 应用内常用通信方式1.使用handler进行线程间通信handler是和Thread绑定的,主线程中创建Hander直接通过new Handler() 来创建即可。自定义线程中则还需要调用Looper.prepare Looper.loop来让Handler起作用,这里就不详细讲解原理及

2015-03-29 19:16:42 1171

原创 Android网络图片加载优化

当我们使用淘宝app浏览产品的时候(很多其他app也是如此),就会发现每次下拉产品目录进行更新加载新图片的时候,都是出现对应的Item的时,才开始从网络下载并加载图片,从而出现很长的延时~

2015-03-28 21:44:14 3431 3

原创 使用Android-Universal-Image-Loader加载网络图片

使用Android-Universal-Image-Loader加载网络图片Android-Universal-Image-Loader是一个开源的Android图片加载辅助组件,其主要目的是图片加载,缓存,显示。提供了一系列配置选项和图片加载,缓存的控制。.GitHub地址:https://github.com/nostra13/Android-Universal-Image-Loade

2015-03-27 19:06:39 2236 6

原创 HttpURLConnection,HttpClient,Volley

HttpURLConnection继承关系: java.lang.Object -java.net.URLConnection -java.net.HttpURLConnection HttpURLConnection继承自URLConnection,可以使用HTTP协议发送接收网络数据。可以接收发送提前不知道长度的数据。HttpURLConnection的使用

2015-03-27 12:17:28 1031

原创 数组去重

Write a function to remove duplicated objects from an array. Preserve the order. For example, if the input array is [1, 5, 4, 2, 7, 2, 6, 5], the result should be [1, 5, 4, 2, 7, 6]. The implementation

2015-03-26 18:57:51 465

原创 Leetcode:Count and Say

The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, …1 is read off as “one 1” or 11. 11 is read off as “two 1s” or 21. 21 is read off as “one 2, the

2015-03-26 18:51:52 314

原创 Leetcode:Implement strStr()

Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Update (2014-11-02): The signature of the function had been updated to retur

2015-03-26 18:47:45 338

原创 Leetcode:Remove Element

Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn’t matter what you leave beyond the new length.public int

2015-03-26 18:43:12 330

原创 Leetcode:Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with cons

2015-03-26 18:42:17 294

原创 Leetcode:Reverse Integer

Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321click to show spoilers.Have you thought about this? Here are some good questions to ask before coding. Bonus

2015-03-26 18:40:26 280

原创 Leetcode: Length of Last Word

Given a string s consists of upper/lower-case alphabets and empty space characters ’ ‘, return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defined as

2015-03-26 18:35:18 332

原创 Leetcode:Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 给你2个排序好的单链表,返回一个merge的单链表。 链表数据结构: public class ListNode

2015-03-26 18:33:20 342

原创 Leetcode: Plus One

Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.给你一个整形数组,该数组实际表示一个非负整数,每个元素代表

2015-03-26 18:31:31 291

原创 Android权限大全

权限名称含义使用场景ACCESS_CHECKIN_PROPERTIES读写checkin数据库"properties"表的权限不是给第三方应用使用的ACCESS_COARSE_LOCATION允许app获取大概位置的权限(来自网络位置源如基站,wifi)LocationManager相关

2015-03-25 20:51:39 627

原创 Android应用跨进程通信

AIDL and Messenger自定义Binder类图1 代码服务端public class MyBinder extends Binder{ public int getCount() { return count; }}private MyBinder binder = new MyBinder();@Overridepublic IBinde

2015-03-23 16:32:10 560

原创 Android系统权限及签名

图1 图2

2015-03-23 16:17:26 1006

原创 Linux文件操作---随手记

linux 文件操作

2015-03-23 12:14:30 620

android-DirectorySelection

Android DirectorySelection Sample A basic app showing how to use Directory Selection API to let users select an entire directory subtree, which extends the Storage Access Framework introduced in Android 4.4 (API level 19).

2016-01-30

C++ 設計新思維

一些新的C++设计思想,包括内存分配技术,SOA,一些设计模式。不过是繁体字,看着很不习惯

2013-10-13

空空如也

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

TA关注的人

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