android控制led燈
A. android能做到控制LED彩燈嗎,不是手機上的LED提示燈,是買來的小彩燈,怎麼做
你用數據線連接小彩燈 就行了
PS:是耳機介面型號的數據線
B. android中怎麼調用led燈 csdn
android的LED燈是通過通知來調用的,只是通知類的一個參數,具體大體實現方法如下:
final int ID_LED=19871103;
NotificationManager nm=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
Notification notification = new Notification();
notification.ledARGB = 0xFFFFFF; //這里是顏色,我們可以嘗試改變,理論上0xFF0000是紅色,0x00FF00是綠色
notification.ledOnMS = 100;
notification.ledOffMS = 100;
notification.flags = Notification.FLAG_SHOW_LIGHTS;
nm.notify(ID_LED, notification);
nm.cancel(ID_LED)。
C. 如何調用Android自帶的LED閃光燈
android的LED燈是通過通知來調用的,只是通知類的一個參數,具體大體實現方法如下:
final int ID_LED=19871103;
NotificationManager nm=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
Notification notification = new Notification();
notification.ledARGB = 0xFFFFFF; //這里是顏色,咱們可以嘗試改變,理論上0xFF0000是紅色,0x00FF00是綠色
notification.ledOnMS = 100;
notification.ledOffMS = 100;
notification.flags = Notification.FLAG_SHOW_LIGHTS;
nm.notify(ID_LED, notification);
nm.cancel(ID_LED);
D. 如何調用Android自帶的LED閃光燈
Android原生或基於原生系統(如CM OMNI 魔趣)在狀態欄按鈕里都會有手電筒按鈕,點擊就可以打開,再次點擊即可關閉; 像華為 小米的這樣的深度定製系統,有一個「手電筒」的軟體; 三星手機可能會在輔助功能里(就是5.0系統的「無障礙」); 實在找不到,就用相機軟體把閃光燈一直開著,就是手電筒。 希望我的回答對你有幫助!