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 ...
随机推荐
- jQuery学习笔记——弹出对话框
引用jQuery库文件的<script>标签,必须放在引用自定义脚本文件的<script>标签之前.否则,在编写的代码中将不能引用到jQuery框架 <script ty ...
- Which hashing algorithm is best for uniqueness and speed?
http://programmers.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness- ...
- 重载new操作符
http://book.51cto.com/art/201202/317799.htm
- ElasticSearch之一——索引
ElasticSearch索引 ElasticSearch 是一个分布式可扩展的实时搜索引擎,它建立在开源搜索引擎框架Apache Lucene基础上.ElasticSearch 不但包括了全文搜索功 ...
- 判断QQ是否在线
<html> <body> ggygygygy<br> <td><a href="http://wpa.qq.com/msgrd?V=1 ...
- 自定义验证jquery.validate
js中填写 $(function() { validateSysConfigForm(); jQuery.validator.addMethod("validateNum", fu ...
- C#List的排序和简单去重总结
List集合在开发过程中很常见,经常我们要对该集合进行一系列操作,本文介绍如何将该集合内的元素进行排序,博主制作简单WinForm应用程序进行演示. 首先,我们来看一下c#泛型List提供的Sort方 ...
- Java7的异常处理新特性-addSuppressed()方法等
开发人员对异常处理的try-catch-finally语句块都比较熟悉.如果在try语句块中抛出了异常,在控制权转移到调用栈上一层代码之前,finally语句块中的语句也会执行.但是finally语句 ...
- inet_ntoa、 inet_aton、inet_addr
inet_addr() 简述:将一个点间隔地址转换成一个in_addr. #include <winsock.h> unsigned long PASCAL FAR inet_addr ...
- JMS基本概念和模型
------------------------------------------------------------------------------------------- JMS是什么 J ...