摘要: 在Android中,Activity主要负责前台页面的展示,Service主要负责需要长期运行的任务,所以在我们实际开发中,就会常常遇到Activity与Service之间的通信,我们一般在Activity中启动后台Service,通过Intent来启动,Intent中我们可以传递数据给Servic... 阅读全文
posted @ 2015-09-04 20:13 netcorner 阅读(756) 评论(0) 推荐(0) 编辑
摘要: android.intent.action.MAIN决定应用程序最先启动的Activity android.intent.category.LAUNCHER决定应用程序是否显示在程序列表里 所以: 如果只有一个activity的应用程序只声明了 android.inte... 阅读全文
posted @ 2015-09-04 12:46 netcorner 阅读(1943) 评论(0) 推荐(0) 编辑
摘要: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (VERSION.SDK_INT >= VERSION_CODES.KITKAT... 阅读全文
posted @ 2015-09-04 09:32 netcorner 阅读(359) 评论(0) 推荐(0) 编辑