• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
vertexes
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

随笔分类 -  Android

 
GPS经纬度转换为百度坐标
摘要:android客户端:Importimport com.baidu.mapapi.CoordinateConvert;import com.baidu.mapapi.GeoPoint;CodeGeoPoint p = new GeoPoint(x, y);GeoPoint p2 = CoordinateConvert.bundleDecode(CoordinateConvert.fromWgs84ToBaidu(p));其变量p为从GPS直接读到的点,p2为在在地图上显示的点;PHP 网页:<?phpfunction getgps($lats,$lngs, $gps=false, $go 阅读全文
posted @ 2012-11-07 09:27 vertexes 阅读(12327) 评论(0) 推荐(0)
获取android 刚发出去的短信
摘要:import android.content.Context;import android.database.ContentObserver;import android.database.Cursor;import android.net.Uri;import android.os.Handler;import android.util.Log; public class ObserveSMSSend extends ContentObserver{ private final String SMSSEND_TYPE="smsInfo"; private final St 阅读全文
posted @ 2011-12-25 13:55 vertexes 阅读(903) 评论(0) 推荐(0)
Android 使用LocationLstenser获取位置信息
摘要:第一步: 注册一个LocationLstenser:this.locationManager=(LocationManager)this.getSystemService(Context.LOCATION_SERVICE); this.locationProvider=this.locationManager.getProvider(LocationManager.GPS_PROVIDER); if(locationManager!=null) { this.locationManager.requestLocationUpdates(locationProvider.getName(),30 阅读全文
posted @ 2011-12-25 13:50 vertexes 阅读(1176) 评论(0) 推荐(0)
android 添加图片时错误:android libpng error: Not a PNG file
摘要:android 在向 drawable 中添加PNG格式的图片会出现如下错误:android libpng error: Not a PNG file解决办法:将原来的图片在windows的画图工具另存为.png,即可,问题虽小,但很害人 阅读全文
posted @ 2011-09-20 19:07 vertexes 阅读(542) 评论(0) 推荐(0)
android 通过字符串来获取R下面资源的ID 值
摘要:方法一:try{ Field field=R.drawable.class.getField("icon"); int i= field.getInt(new R.drawable()); Log.d("icon",i+"");}catch(Exception e){ Log.e("icon",e.toString());}方法二: Resources res=getResources(); int i=res.getIdentifier("icon","drawable", 阅读全文
posted @ 2011-09-20 15:09 vertexes 阅读(5564) 评论(0) 推荐(0)
 

公告


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3