无信号  

2013年6月27日

摘要: GPS真实的转百度:GeoPoint geoPoint=CoordinateConvert.fromWgs84ToBaidu(new GeoPoint((int)(Double.parseDouble(p[1])*LOCAL_UNIT), (int)(Double.parseDouble(p[0])*LOCAL_UNIT))); 阅读全文
posted @ 2013-06-27 10:46 BenXian 阅读(324) 评论(0) 推荐(0) 编辑

2013年5月18日

摘要: 1 package com.wms.file2; 2 3 import java.io.ByteArrayOutputStream; 4 import java.io.File; 5 import java.io.FileInputStream; 6 import java.io.FileNotFoundException; 7 import java.io.FileOutputStream; 8 import java.io.IOException; 9 10 import android.app.Activity; 11 import android.os.Bund... 阅读全文
posted @ 2013-05-18 10:17 BenXian 阅读(171) 评论(0) 推荐(0) 编辑

2013年5月10日

摘要: 1 /** 2 * 将String转换为Unicode编码的字符串 3 * Unicode编码规则:Unicode码对每一个字符用4位16进制数表示。 4 * 具体规则是:将一个字符(char)的高8位与低8位分别取出,转化为16进制数, 5 * 如果转化的16进制数的长度不足2位,则在高位补0,然后将高、低8位转成的16进制字符串拼接起来并在前面补上"\\u" 即可。 6 * 7 * @param str 8 * @return 9 */10 public static String convertS... 阅读全文
posted @ 2013-05-10 15:02 BenXian 阅读(309) 评论(0) 推荐(0) 编辑

2013年4月28日

摘要: <?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView a 阅读全文
posted @ 2013-04-28 15:32 BenXian 阅读(210) 评论(0) 推荐(0) 编辑

2013年4月26日

摘要: 以下是语音功能主要代码:首先,当然是要在手机上安装tts语音引擎包,然后安装tts语音中文包,在设置语音里找到引擎设置、语音设置:讯飞公司为什么在以上界面设了我的一朋友名字“晓燕”上去呀,O(∩_∩)O哈哈~讯飞公司为什么在以上界面设了我的一朋友名字“晓燕”上去呀,O(∩_∩)O哈哈~设好之后:权限:<uses-permission android:name="android.permission.READ_PHONE_STATE"/> <uses-permission android:name="android.permission.RECEI 阅读全文
posted @ 2013-04-26 15:05 BenXian 阅读(491) 评论(0) 推荐(0) 编辑

2013年4月25日

摘要: 好炫的高德:Mainfest清单:需要key<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.xmb.test_1" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="15&quo 阅读全文
posted @ 2013-04-25 10:34 BenXian 阅读(9228) 评论(2) 推荐(0) 编辑

2013年4月10日

摘要: package com.xmb.MyGps2;import android.app.Activity;import android.util.Log;import android.os.Bundle;import android.location.GpsStatus;import android.location.Location;import android.location.LocationListener;import android.location.LocationManager;import android.location.GpsSatellite;import android. 阅读全文
posted @ 2013-04-10 15:54 BenXian 阅读(806) 评论(0) 推荐(0) 编辑
 
摘要: package com.cw.history;import java.io.ByteArrayInputStream;import java.io.IOException;import java.io.InputStream;import java.io.UnsupportedEncodingException;import java.net.URLEncoder;import java.util.ArrayList;import java.util.List;import org.apache.http.HttpResponse;import org.apache.http.HttpStat 阅读全文
posted @ 2013-04-10 11:56 BenXian 阅读(321) 评论(0) 推荐(0) 编辑

2013年4月6日

摘要: Android应用经常会和服务器端交互,这就需要手机客户端发送网络请求,下面介绍四种常用网络请求方式,我这边是通过Android单元测试来完成这四种方法的java.net包中的HttpURLConnection类Get方式: 1 // Get方式请求 2 public static void requestByGet() throws Exception { 3 String path = "https://reg.163.com/logins.jsp?id=helloworld&pwd=android"; 4 // 新建一个URL对象 5 URL url = ne 阅读全文
posted @ 2013-04-06 13:51 BenXian 阅读(360) 评论(0) 推荐(0) 编辑

2013年4月3日

摘要: <service android:name="com.baidu.location.f" android:enabled="true" android:process=":remote" android:permission="android.permission.BAIDU_LOCATION_SERVICE"> <intent-filter> <action android:name="com.baidu.location.service_v2.4">< 阅读全文
posted @ 2013-04-03 14:18 BenXian 阅读(714) 评论(0) 推荐(0) 编辑