第一步,创建一个广播接收者, BootReceiver extends BroadcastReceiver 第二步,在AndroidManifest.xml配置文件中注册广播接收者与配置开机启动时对应的Action: <receiver android:name="com.itheima.lesuo ...
分类:
其他好文 时间:
2017-02-13 13:48:35
阅读次数:
163
译者注:译者:aroundme原文地址:https://developer.android.com/about/versions/nougat/android-7.0.html主要是介绍Android...
分类:
移动开发 时间:
2017-02-13 08:50:13
阅读次数:
373
监控设备状态是创建高效和动态的应用程序的重要部分,应用程序的行为会根据连接性、电量状态和dock状态发生改变。 当设备状态中的一个发生变化时,Android会广播Intent。 思路:如何响应Android广播的Intent?--> Broadcast Receiver?是如何获取设备状态信息的? ...
分类:
移动开发 时间:
2017-02-11 22:44:11
阅读次数:
226
activity和service通信:通过binder 举个我实际项目中的例子:在service中下载更新应用 首先是下载更新apk的service: 调用如上service: 声明binder对象: 通过intent绑定service: 如上在onserviceConnected中调用binder ...
分类:
其他好文 时间:
2017-02-11 21:42:07
阅读次数:
216
Intent第一个用法便是用它来进行活动之间的跳转 新建一个SecondActivity活动,并为之新建一个second_layout.XML布局文件,也创建一个Button按钮,名字为Button 2.然后在AndroidManifest.XML中进行注册。 接下来在FirstAcitivity中 ...
分类:
移动开发 时间:
2017-02-11 12:35:26
阅读次数:
247
一、Intent对象的基本概念 -Intent是Android应用程序组件之一 -Intent对象在Android系统当中表示一种意图 -Intent当中最重要的内容是action与data 二、Intent对象的基本使用方法 Intent intent = new Intent(); intent ...
分类:
移动开发 时间:
2017-02-10 22:13:34
阅读次数:
218
原文:Android: Intents Tutorial
作者:Darryl Bayliss
译者:kmyhy
人不会漫无目的地瞎逛,他们所做的大部分事情——比如看电视、购物、编写下一个杀...
分类:
移动开发 时间:
2017-02-09 12:02:29
阅读次数:
279
package com.goodness.goodness; import android.content.Context; import android.content.Intent; import android.os.Handler; import android.support.v7.app... ...
分类:
移动开发 时间:
2017-02-03 16:46:01
阅读次数:
243
对于面向 Android 7.0 的应用,Android 框架执行的 StrictMode API 政策禁止在您的应用外部公开 file:// URI。如果一项包含文件 URI 的 intent 离开您的应用,则应用出现故障,并出现 FileUriExposedException 异常。 要在应用间 ...
分类:
移动开发 时间:
2017-02-02 17:32:01
阅读次数:
246
Android Service 一是处理Intent请求,二是像COM组件一样提供接口访问功能。Context.startService和Service.onStart这样的命名设计真误导人。 ...
分类:
移动开发 时间:
2017-02-02 10:48:24
阅读次数:
181