• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






♂小旭

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

随笔分类 -  Service

 
Android Service中的android:process=":remote"
摘要:android:process=":remote",代表在应用程序里,当需要该service时,会自动创建新的进程。而如果是android:process="remote",没有“:”分号的,则创建全局进程,不同的应用程序共享该进程。 阅读全文
posted @ 2013-07-19 08:59 ♂小旭 阅读(757) 评论(0) 推荐(0)
Android中判断Service是否运行
摘要:if (isServiceStarted(MyCurrentActivity.this, "包名")){ txtStatus.setText("正在运行"); } else{ txtStatus.setText("未运行"); }public static boolean isServiceStarted(Context context,String PackageName){ boolean isStarted =false; try{ int intGetTastCounter = 1000; ActivityManager mA 阅读全文
posted @ 2013-04-17 10:07 ♂小旭 阅读(189) 评论(0) 推荐(0)
Android中Service的使用
摘要://启动ServicestartService(new Intent(MyCurrentActivity.this, MyService.class));//停止ServicestopService(new Intent(MyCurrentActivity.this, MyService.class));@SuppressLint("SimpleDateFormat")public class MyGPSService extends Service { private String strLongitude; private String strLatitude; Tim 阅读全文
posted @ 2013-04-17 09:58 ♂小旭 阅读(314) 评论(0) 推荐(0)