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 ...
随机推荐
- js 限制input输入字节长度
function WidthCheck(str, maxLen){ var w = 0; var tempCount = 0; //length 获取字数数,不区分汉子和英文 for (var i=0 ...
- Array subscript is not an integer
字典的字母写成大写了,也不能查成出来,没有报没有这个字典,反而报这个错……找了好久
- Mini ORM——PetaPoco笔记(转)
记录一下petapoco官网博客的一些要点.这些博客记录了PetaPoco是如何一步步改进的. 目录: Announcing PetaPoco PetaPoco-Improvements PetaPo ...
- linux win 通用的获取Mac的方法
经测试下面方法获取Mac跨平台 protected override void OnLoad(EventArgs e) { Response.Write(string.Join("<b ...
- MongoDB学习笔记(索引)(转)
一.索引基础: MongoDB的索引几乎与传统的关系型数据库一模一样,这其中也包括一些基本的优化技巧.下面是创建索引的命令: > db.test.ensureIndex({" ...
- shell编程中的select用法
select 语句 select表达式是bash的一种扩展应用,擅长于交互式场合.用户可以从一组不同的值中进行选择: select var in ... ; do break; done .... n ...
- Android布局属性大全
RelativeLayout http://wenku.baidu.com/view/2e39724333687e21af45a97e.html?from=related&hasrec=1 h ...
- 正确使用Python logging
这篇文章主要参考: http://victorlin.me/posts/2012/08/26/good-logging-practice-in-python ===================== ...
- SandcastleBuilder-生成帮助文档的时候报错...
错误1: SHFB: Error BE0043: Unexpected error detected in last build step. See output above for details. ...
- JAVA之Socket编程
网上对Socket的诠释很多,也很全,在这里我就不多说了,总之,现在的网络处处都在使用Socket.本帖是一个Socket的例子,用来模拟一个简单的登录系统,只有核心代码,访问数据库.输入神马的统统没 ...