- 博客(20)
- 资源 (2)
- 收藏
- 关注
原创 IOS 多视图UIView左右来回滑动切换效果!
多视图页面左右来回滑动切换效果!//// ViewController.h// demoA0//// Created by yuhang on 13-2-18.// Copyright (c) 2013年 yuhang. All rights reserved.//#import #define ViewNumber 10
2013-02-20 22:35:02
16514
原创 android判断快捷方式是否已经创建的方法
public boolean checkShortcut(){ boolean isInstallShortcut = false ; final ContentResolver cr =this.getContentResolver(); final String AUTHORITY = "com.android.launcher.settings"; final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/favorites?n
2011-05-16 23:01:00
710
原创 Android中编写Service相关的知识
1.在Android中编写Service,需要继承android.app.Service,覆盖其onCreate()和onStart(Intent intent, int startId)方法即可,onCreate方法只在service创建时调用,onStart方法每次都会调用。2.在Service中不能直接访问数据库,只能通过ContentResolver访问,如果访问自己的数据,需要继承ContentProvider并实现其方法,才能被ContentResolver访问,以下使用ContentResol
2011-05-16 00:08:00
1339
原创 android本地后台服务示例
在android编写Service入门中介绍了android的两种后台服务,本地和远程的。这里用本地服务做了一个模拟定时后台发短信的技术原型。启动该示例应用的样子:选择启动:启动后,可看到ddms logcat日志:这是操作:启动、停止和退出应用,显示的调试日志信息。模拟后台服务每5秒钟发送一次短信信息。主要代码,后台服务SmsService: package com.easymorse; import android.app.Service; import android.content.Intent;
2011-05-15 16:58:00
6117
原创 Android-窗口小部件(App Widgets)
应用程序窗口小部件App Widgets应用程序窗口小部件(Widget)是微小的应用程序视图,可以被嵌入到其它应用程序中(比如桌面)并接收周期性的更新。你可以通过一个App Widget provider来发布一个Widget。可以容纳其它App Widget的应用程序组件被称为App Widget宿主。下面的截屏显示了一个音乐App Widget。这篇文章描述了如何使用App Widget Provider发布一个App Widget。基础知识The Basics为了创建一个App Widget,你需要
2011-05-15 09:08:00
538
原创 Android 数字签名
在Android系统中,所有安装到系统的应用程序都必有一个数字证书,此数字证书用于标识应用程序的作者和在应用程序之间建立信任关系,如果一个permission的protectionLevel为signature,那么就只有那些跟该permission所在的程序拥有同一个数字证书的应用程序才能取得该权限。Android使用Java的数字证书相关的机制来给apk加盖数字证书,要理解android的数字证书,需要先了解以下数字证书的概念和java的数字证书机制。Android系统要求每一个安装进系统的应用程序都是
2011-05-14 23:48:00
332
原创 Android创建和删除桌面快捷方式
/*** 为程序创建桌面快捷方式*/private void addShortcut(){Intent shortcut = new Intent(“com.android.launcher.action.INSTALL_SHORTCUT”);//快捷方式的名称shortcut.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(R.string.app_name));shortcut.putExtra(“duplicate”, false); //不允许重复创建/
2011-05-14 22:07:00
564
原创 Android 状态栏通知Notification用法
Notification可以在屏幕最顶部的状态栏上显示一个图标通知(QQ用的就是这个),通知的同时可以播放声音,以及振动提示用户,点击通知还可以返回指定的Activity.例子的效果图:下面我们来实现。布局main.xml:就两个按钮,一个添加Notification,一个删除Notificationjava代码:package com.pocketdigi.Notification; import android.app.Activity;import android.app.Notification;i
2011-05-14 21:29:00
621
原创 Android – Listen to Phone Notifications using android.os.Mailbox
When i was looking at the strace output closely. I noticed a service named android.telephony.PhoneNotifier. It stuck somewhere in my head. A few(?) days later i ran info the android.os.Mailbox class. Another few days later, when poking into the dexdump out
2011-05-14 02:01:00
516
原创 android 监听来电
Android来电号码获取的方法很简单,虽然Dalvik上的程序都是Java写的,但是仍然可以处理系统事物,使用 PhoneStateListener;类可以监测话机状态,而TelephonyManager可以获取电话服务的实例,写代码时不要忘了在 androidmanifest.xml中加入权限。需要引入两个Packageimport android.telephony.PhoneStateListener;import android.telephony.TelephonyManager;MyPhone
2011-05-14 01:52:00
646
原创 Android NDK 往sdcard写文件
File IO works fine on Android using JNI. Perhaps you are trying to open a file with a bad path and not checking the return code? I modified the hello-jni example to demonstrate that it is indeed possible to open file and write to it. I hope this helps./* *
2011-05-14 01:50:00
2311
原创 铃声和音量的获取程序
通过程序获取android系统手机的铃声和音量。同样,设置铃声和音量的方法也很简单!AudioManager mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);//通话音量int max = mAudioManager.getStreamMaxVolume( AudioManager.STREAM_VOICE_CALL );int current = mAudioManager.getStreamVolume( Au
2011-05-14 01:42:00
325
原创 android特殊代码
android以下代码为特殊代码,通过拨号程序拨相应号码来实现相应功能。 * 显示IMEI: *#06# * 开启语音拨号记录 *#*#8351#*#* * 关闭语音拨号记录 *#*#8350#*#* * 手机信息/设置 *#*#4636#*#* * 现场测试 *#*#7262626#*#* * PUK解锁 (从紧急拨号界面) **05***#
2011-05-14 01:40:00
589
原创 Android编程获取网络连接状态(3G/Wifi)及调用网络配置界面
Android编程获取网络连接状态(3G/Wifi)及调用网络配置界面获取网络连接状态 随着3G和Wifi的推广,越来越多的Android应用程序需要调用网络资源,检测网络连接状态也就成为网络应用程序所必备的功能。 Android平台提供了ConnectivityManager类,用于网络连接状态的检测。 Android开发文档这样描述ConnectivityManager的作用: Class that answers queries about the state of network connectiv
2011-05-14 01:36:00
1421
原创 加快Dotnet Compact Framework 2.0 运行速度与全屏显示
修改应用程序入口点:using System;using System.Collections.Generic;using System.Windows.Forms;using System.Threading;namespace YSPdaSmart{ static class Program { /// /// 应用程序的主入口点。
2007-01-07 17:37:00
1037
原创 PPC开发体验一
我想很多人都知道SqlCE使用远程数据访问请求数据都会用SqlCeRemoteDataAccess 类的PULL来请求,也叫拉数据,网上也可以找到相关资料。在我个人使用中,因为对数据库的不熟悉,所以带来了很多麻烦。先看看相关代码: private static string internetserver = "http://192.168.1.2/MobileServer/sql
2006-02-27 00:37:00
1274
2
原创 WinCE开发忠告
可以说当我们花了大部分时间将已有的应用程序移植到Microsoft Windows CE中。一般说来,这个计划不是太难。我们起步于Microsoft Win32代码,当然Windows CE是基于Win32应用程序接口(API)的。有利的是,我们的应用程序(即Raima 数据管理器)有方便的使用接口,并包含一个大约由150个子函数组成的库,这些函数都是由C语言写成,可以用来创建、管理和访问数据库。
2006-02-14 00:15:00
1570
原创 第一次PC蓝牙开发亲密接触
刚接触J2ME不久,学着写蓝牙的应用,想写个手机与PC通过蓝牙通讯的程序,PC端的开发我想应不难吧。在网上搜索了一会相关资料,结果发现很少很少,连基本的入门资料都没有,晕。查看了几天,终有点头绪,也许我笨吧,用了这么长时间才有一丁点的结果,急不及待地写上自已的Blog,发表一下自已如何建立蓝牙开发平台的经过。 在网上找了很多相关的资料,都没发现入门的。在蓝牙中国的网站上看了看,都说要
2005-02-01 05:02:00
2630
9
原创 J2ME与Web Service
1. 服务端 这次要发布的web service非常简单。它的功能是把从客户端传入的字符串中的小写字母转变成大写字母,再返回给客户端。Soap 服务器采用apache的AXIS(可以从http://ws.apache.org/axis/下载),应用服务器可以选用各种servlet 容器,我这里采用的是weblogic。1.1 实现类的源代码// StringProcessor.java
2004-11-28 19:50:00
1174
原创 Eric的超高效数据分页(图示+代码) ^_^
数据表结构:megaid int IDENTITY (1, 1) NOT NULL PRIMARY KEY CLUSTEREDmegaguid char (36) NOT NULL INDEX数据生成脚本:DECLARE @i intSET @i = 1WHILE @i 1000001 BEGIN INSERT INTO megatable (megaguid) V
2004-09-10 12:36:00
842
Window Mobile5/6 WinCE 基于CEMAPI的邮件短信封装类的工程
2009-08-10
Windows Mobile Camera Capture
2009-03-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人