LED notification in Android device
Code can control the LED notification in Android device, using android.app.Notification:
1 |
notification = new Notification(); |
ledARGB: The color of the led. The hardware will do its best approximation.
ledOffMS: The number of milliseconds for the LED to be off while it’s flashing. The hardware will do its best approximation.
ledOnMS: The number of milliseconds for the LED to be on while it’s flashing. The hardware will do its best approximation.
Notice, above 3 parameters are all explained as “The hardware will do its best approximation”.
In my Phone, ZTE U5, it seems that only Color.Red, Color.Green and Color.Yellow are supported. Color.Blue, Color.White and others doesn’t work.
Notification.FLAG_SHOW_LIGHTS references:
Since hardware varies, you are not guaranteed that any of the values you pass are honored exactly. Use the system defaults (TODO) if possible because they will be set to values that work on any given hardware.
So it’s better to use : notification.defaults = Notification.DEFAULT_LIGHTS;
LED notification in Android device的更多相关文章
- Android Device Orientation
最近在处理相机拍照的方向问题,在Android Device的Orientation问题上有了些疑问,就顺便写个Demo了解下Android Device Orientation究竟是怎么个判断. A ...
- 解决Android Device Chooser 找不到设备问题
第一种情况: 已经启动了官方的模拟器也进入了Android手机界面,可是在Android Device Chooser 看不到设备,怎么办? 例如以下图所看到的,使用Reset adb 或者在adb所 ...
- Android Device Chooser中显示Target unknown解决方法
手机插在电脑上准备调试程序来着,通过eclipse运行时,弹出的Android Device Chooser中显示设备名是?????,Target未知,无法继续运行. 可以通过以下步骤解决(Ubunt ...
- 6.5、Android Studio的Android Device Monitor
Android Device Monitor是一个独立的工具,可以对Android应用进行调试和分析.Android Device Monitor无需安装整合在一个IDE中,比如像Android St ...
- Android Device Administration 设备管理器——实现一键锁屏
Android Device Administration 设备管理器--实现一键锁屏 最近研究了一下安全这一块的内容,当然,我是比较水的,所以也拿不出什么好知识点,但是有一些冷门的东西我还是可以聊聊 ...
- Android device debug (adb) by Charge Only mode
Android device debug by Charge Only mode Method 1 Connect devices to computer and execute lsusb Find ...
- 解决 Android Device Monitor 常见问题
Ø 简介 什么是 Android Device Monitor,中文意思就是安卓设备监视器,用于管理安装设备(手机.模拟器)用的.下面列出 Android Device Monitor 常见的一些问 ...
- Android Device Monitor 文件管理的常见问题 - z
Android Device Monitor 是 Android Studio 中用于监测模拟器或真机运行状态的一款开发者工具.但开发者在使用它的过程中往往会遇到很多问题,尤其对于新手.本文分析了实际 ...
- 在Android Studio中打开Android Device Monitor时报错的解决方法
在Android Studio中打开Android Device Monitor时报以下错误时(Android-SDK\tools\lib\monitor-x86_64\configuration\1 ...
随机推荐
- 收缩菜单 css变样
// 收缩菜单 $("#leftMenu li h3").click(function(){ $v = $(this).next('.ajax').css('display'); ...
- Linux下的压缩解压缩命令详解
linux zip命令zip -r myfile.zip ./*将当前目录下的所有文件和文件夹全部压缩成myfile.zip文件,-r表示递归压缩子目录下所有文件. 2.unzipunzip -o - ...
- NopCommerce Url分析
using System; using System.Web; using System.Web.Routing; using Nop.Core; using Nop.Core.Data; using ...
- Java面试笔记
1.&和&& if(str != null& !str.equals("")){ System.out.println("ok" ...
- Spring入门_02_属性注入
Spring 的set方法(属性)注入 UserAction类中设置属性和get.set方法.(实际上只需要set方法) private List list = null; private Set s ...
- SQL查询表字段的信息
如题,代码: select * from information_schema.columns where table_name = 'TableName'
- spring之BeanFactoryAware接口
springBeanFactoryAware (转)要直接在自己的代码中读取spring的bean,我们除了根据常用的set外,也可以通过spring的BeanFactoryAware接口实现,只要实 ...
- 如何让图片在垂直方向与 div的底部对齐 水平居中
需要图片的绝对定位postion: absolute. 一般定位时, 是用div去定位. 一般不直接用 非div去"绝对/相对"定位. 如不直接用 等去定位. 因为这些好像不好定位 ...
- A funny story in regard to a linux newbie
ZZ from here : ask what kernel ring buffer is A few days ago I started thinking that my linux educa ...
- MySQL性能优化的21条最佳经验【转】
转载自http://www.cnblogs.com/jiaosq/p/5843437.html 今天,数据库的操作越来越成为整个应用的性能瓶颈了,这点对于Web应用尤其明显.关于数据库的性能,这并不只 ...