Android与iOS支持的音频格式
摘要:AndroidAndroid Supported Media Formats :http://developer.android.com/guide/appendix/media-formats.htmliOSThe Basics: Audio Codecs, Supported Audio Formats, and Audio Sessions:http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html总结对比 Andro
阅读全文
posted @
2013-05-17 14:55
Anthony Li
阅读(10746)
推荐(1) 编辑
使用Scala开发Android
摘要:需求:> Android开发环境:EclipseAndroid SDKADT> 安装Scala IDE插件:官方网站:http://scala-ide.org/index.htmlEclipse -> Help -> Install New Software...点击Add按钮Location:http://download.scala-ide.org/sdk/e38/scala210/stable/site> 安装AndroidProguardScala插件:GitHub地址:https://github.com/banshee/AndroidProguardS
阅读全文
posted @
2013-03-27 14:23
Anthony Li
阅读(5613)
推荐(1) 编辑
【Android SOAP】基于第三方开源项目ksoap-android
摘要:项目地址:http://code.google.com/p/ksoap2-android/服务器端,参考:【Web Service】Apache Tuscany发布Web Service准备工作:下载JAR文件地址:http://ksoap2-android.googlecode.com/svn/m2-repo/com/google/code/ksoap2-android/ksoap2-android-assembly/3.0.0-RC.4/ksoap2-android-assembly-3.0.0-RC.4-jar-with-dependencies.jar添加至项目Build Path示例
阅读全文
posted @
2013-01-21 11:54
Anthony Li
阅读(2917)
推荐(0) 编辑
【Android Clock Synchronization】Android时钟同步:基于NTP协议的第三方库Apache Commons Net
摘要:Apache Commons NetApache Commons Net库实现了许多基本的客户端网络协议,其中包括NTP/SNTP。地址:http://commons.apache.org/net/1、创建JAR包进入下载页,当前的最新版本是Commons Net 3.2,选择源代码下载下载完成,解压缩.tar.gz或.zip文件进入目录/src/main/java,打开Eclipse,将源代码拷贝到一个新建的Java Project中删除多余的package,只留下org.commons.net,org.commons.net.util,org.commons.net.io和org.comm
阅读全文
posted @
2012-12-06 11:48
Anthony Li
阅读(1682)
推荐(0) 编辑
java.lang.RuntimeException: startPreview failed
摘要:HTC Desire Android 2.2 真机测试,报错:12-04 14:16:55.687: E/AndroidRuntime(6989): FATAL EXCEPTION: main12-04 14:16:55.687: E/AndroidRuntime(6989): java.lang.RuntimeException: startPreview failed12-04 14:16:55.687: E/AndroidRuntime(6989): at android.hardware.Camera.startPreview(Native Method)12-04 14:16:55.
阅读全文
posted @
2012-12-04 16:46
Anthony Li
阅读(7363)
推荐(0) 编辑
【Android Lock Pattern】图案解锁(一):LockPatternView源代码
摘要:选择Settings -> Security ->Set up screen lock设置屏幕锁选择Pattern设置图案在我的真机HTC Desire(Android 2.2)上,截图如下:Android是一个开源的操作系统,所以我们可以通过下载该控件的源代码重用该控件。1、LockPatterView源代码图案解锁控件,对应着framework层的LockPatterView类,如下所示:源代码:https://github.com/android/platform_frameworks_base/blob/master/core/java/com/android/intern
阅读全文
posted @
2012-12-03 17:27
Anthony Li
阅读(17225)
推荐(0) 编辑
【Android QR Code】开源项目:ZXing(三)二维码解码
摘要:继续上一节的内容本节我们将对上一节的QQ群号二维码进行解码QQ群号二维码图片另存为后,将下载的.jpg拷贝到项目assets目录下1、解码配置Map<DecodeHintType,Object> hints = new EnumMap<DecodeHintType,Object>(DecodeHintType.class);Collection<BarcodeFormat> decodeFormats = EnumSet.noneOf(BarcodeFormat.class);decodeFormats.addAll(EnumSet.of(BarcodeFo
阅读全文
posted @
2012-11-29 17:09
Anthony Li
阅读(6259)
推荐(0) 编辑
【Android QR Code】开源项目:ZXing(二)二维码编码
摘要:准备工作:添加依赖库core.jar在Package Explorer选择导入的项目,右键 -> Build Path -> Add External Archives...选择zxing/core目录下的core.jar1、设置编码内容使用的字符集Map<EncodeHintType,Object> hints = new EnumMap<EncodeHintType,Object>(EncodeHintType.class);hints.put(EncodeHintType.CHARACTER_SET, "UTF-8");messag
阅读全文
posted @
2012-11-27 15:24
Anthony Li
阅读(6520)
推荐(0) 编辑
【Android QR Code】开源项目:ZXing(一)导入项目
摘要:维基百科:QR Codehttp://en.wikipedia.org/wiki/QR_code开源项目:ZXinghttp://code.google.com/p/zxing/1、下载源代码导航栏,选择Downloads下载当前最新版本2、导入项目解压下载的.zip文件打开Eclipse,菜单栏,选择file -> new -> project...在弹出的New Project对话框中,选择Android -> Android Project from Existing Code,点击NextRoot Directory文本框,点击Browse按钮,选择zxing/and
阅读全文
posted @
2012-11-26 15:04
Anthony Li
阅读(11667)
推荐(0) 编辑
【Android OpenGL ES】阅读hello-gl2代码(四)C/C++代码
摘要:JNI函数实现extern "C" { JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_init(JNIEnv * env, jobject obj, jint width, jint height); JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_step(JNIEnv * env, jobject obj);};JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_init(JN
阅读全文
posted @
2012-11-07 10:48
Anthony Li
阅读(2017)
推荐(0) 编辑
【Android OpenGL ES】阅读hello-gl2代码(三)配置EGL
摘要:关于EGL的介绍:EGL is an interface between Khronos rendering APIs such as OpenGL ES or OpenVG and the underlying native platform window system. It handles graphics context management, surface/buffer binding, and rendering synchronization and enables high-performance, accelerated, mixed-mode 2D and 3D rend
阅读全文
posted @
2012-11-05 17:21
Anthony Li
阅读(4078)
推荐(0) 编辑
【Android OpenGL ES】阅读hello-gl2代码(二)Java代码
摘要:AndroidManifest.xml<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.gl2jni"> <application android:label="@string/gl2jni_activity"> <activity android:n
阅读全文
posted @
2012-11-05 15:51
Anthony Li
阅读(2184)
推荐(0) 编辑
【Android OpenGL ES】阅读hello-gl2代码(一)准备工作
摘要:Android NDK开发包中,在sample文件夹下,有一个使用OpenGL ES 2.0的范例——hello-gl2。它为我们展示了,如何通过Android NDK,调用底层OpenGL ES库来渲染界面。1、导入项目打开Eclipse,New->Project...,选择Android Project from Existing Code,点击Next下一步Import Projects,在Root Directory:栏,点击按钮Browser浏览文件夹,选择Android NDK根目录/samples/hello-gl2,点击Finish导入项目成功导入项目后,会在Packag
阅读全文
posted @
2012-11-04 16:42
Anthony Li
阅读(3046)
推荐(0) 编辑
Android SDK Manager无法更新
摘要:方法A:菜单栏Tools -> 下拉菜单Options...勾选复选框 force https://...http://...方法A,如果行不通,方法B:打开文件夹C:\Windows\System32\drivers\etc,找到文件hosts通常情况下,不是管理员是没有权限修改该文件的。所以,先修改该文件的权限。右键,属性 -> 安全 -> 编辑,为你当前登录用户添加权限。在该文件末尾添加:203.208.46.146 dl.google.com203.208.46.146 dl-ssl.google.com重新启动Android SDK Manager
阅读全文
posted @
2012-10-16 16:03
Anthony Li
阅读(503)
推荐(0) 编辑
【学习Android NDK开发】native code通过JNI调用Java方法
摘要:1、建立Android应用application name: CallJavaMethodpackage name: com.example.cjmmain Activity: MainActivitymain Activity layout: activity_main2、Java实现打开layout/activity_main.xml布局文件,添加按钮控件,ID为“display_button_activity_main”<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android&quo
阅读全文
posted @
2012-10-12 18:06
Anthony Li
阅读(7850)
推荐(0) 编辑
【学习Android NDK开发】Type Signatures(类型签名)
摘要:类型签名(Type Signatures) (<Parameter 1 Type Code>[<Parameter 1 Class>];...)<Return Type Code>The JNI uses the Java VM’s representation of type signatures. Following Table shows these type signatures.Type SignatureJava TypeZbooleabBbyteCcharSshortIintJlongFfloatDdoubleL full-qualified-
阅读全文
posted @
2012-10-11 16:50
Anthony Li
阅读(707)
推荐(0) 编辑
【学习Android NDK开发】Primitive Types Map(基本类型映射)
摘要:Java type JNI type C type Stdint C type booleanjbooleanunsigned charuint8_tbytejbytesigned charint8_tcharjcharunsigned shortuint16_tdoublejdoubledoubledoublefloatjfloatfloatfloatintjintintint32_tlongjlonglong longint64_tshortjshortshortint16_t
阅读全文
posted @
2012-10-07 17:23
Anthony Li
阅读(424)
推荐(0) 编辑
【学习Android NDK开发】搭建Android NDK开发环境(Ubuntu 12.04 LTS 32-bit)
摘要:1、安装make build工具执行以下命令:sudo apt-get install build-essential2、下载NDK官网下载页:http://developer.android.com/tools/sdk/ndk/index.html选择Linux 32/64-bit (x86)版本,下载下载成功后,解压到/usr/lib/目录下3、配置Eclipse插件a) 搭建SDK开发环境,参考:【学习Android NDK开发】搭建Android SDK开发环境(Ubuntu 12.04 LTS 32-bit)打开Eclipse,设置NDK路径,Window -> Prefere
阅读全文
posted @
2012-10-07 14:27
Anthony Li
阅读(6166)
推荐(0) 编辑
ERROR: Could not extract package's data directory. Are you sure that your installed application is debuggable?
摘要:ndk-gdb,调试native code,出现以下错误:ndk-gdb --verbose,查看信息: --verbose: Print verbose information about the native debugging session setup. Only needed to debug problems when you can't connect and that the error messages printed by ndk-gdb are not enough.调试手机:HTC Desire Android 2.2Are you sure tha...
阅读全文
posted @
2012-10-07 13:36
Anthony Li
阅读(3245)
推荐(0) 编辑
【学习Android NDK开发】Android.mk文件
摘要:以下内容来自Android NDK文档<ANDROID_NDK_HOME>/docs/ANDROID-MK.htmlOverview:An Android.mk file is written to describe your sources to thebuild system. More specifically:- The file is really a tiny GNU Makefile fragment that will be parsed one or more times by the build system. As such, you should try t
阅读全文
posted @
2012-10-01 11:55
Anthony Li
阅读(4202)
推荐(0) 编辑