Android Notification LED sample

Note : You should lock(screen) the phone before run this project(via android IDE) , because notification LED will be highlighted only when screen is off

Source SVN:LEDNotification
Zipped Source:LEDNotification
 
  public class LEDNotification extends Activity {
 @Override
 protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  setContentView(R.layout.activity_main);

  NotificationManager notif = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);

  for (int i = 0; i < 8; i++) {
   notif.cancel(1); // clear previous notification 
   final Notification notification = new Notification();
   if (i == 0){
    notification.ledARGB = Color.MAGENTA;
   }else if (i == 1){
    notification.ledARGB = Color.BLUE;
   }else if (i == 2){
    notification.ledARGB = Color.CYAN;
   }else if (i == 3){
    notification.ledARGB = Color.GRAY;
   }else if (i == 4){
    notification.ledARGB = Color.GREEN;
   }else if (i == 5){
    notification.ledARGB = Color.RED;
   }else if (i == 6){
    notification.ledARGB = Color.WHITE;
   }else if (i == 7){
    notification.ledARGB = Color.YELLOW;
   }
   notification.ledOnMS = 1000;
   notification.flags |= Notification.FLAG_SHOW_LIGHTS;
   notif.notify(1, notification);
   try {
    Thread.sleep(1000);
   } catch (InterruptedException e) {    
    e.printStackTrace();
   }
  }

 }

 

} 
No Special permission required for this project (LED Notification)

48 comments :

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. It's interesting that many of the bloggers your tips helped to clarify a few things for me as well as giving... very specific nice content.Android Training institute in chennai with placement | Android Training in chennai |Android Training in Velachery | android development course fees in chennai

    ReplyDelete
  3. Good and nice one, thanks for your valuable information and time, it is very useful for me to learn and study.
    Android Training in chennai|Android Training institute in chennai

    ReplyDelete
  4. exception in -> notif.notify(1, notification);

    ReplyDelete
  5. I and my friends were going through the nice, helpful tips from the blog then the sudden came up with an awful suspicion I never expressed respect to the website owner for those secrets.
    health and safety courses in chennai

    ReplyDelete
  6. This is such a good post. One of the best posts that I\'ve read in my whole life. I am so happy that you chose this day to give me this. Please, continue to give me such valuable posts. Cheers!
    python training in chennai | python training in chennai | python training in bangalore

    ReplyDelete
  7. I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 

    Online DevOps Certification Course - Gangboard

    ReplyDelete
  8. Hi Thanks for sharing this amazing post. It's really Informative and very helpful. and your writing style is so awesome it's really nice and easy to understand. i appreciate for this blog post.

    https://www.excelptp.com/professional-training-programs/android-training.html

    ReplyDelete
  9. Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information.

    rpa training in chennai
    rpa training in bangalore
    rpa course in bangalore
    best rpa training in bangalore
    rpa online training

    ReplyDelete
  10. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    python course institute in bangalore
    python Course in bangalore
    python training institute in bangalore

    ReplyDelete
  11. Nice tutorial. Thanks for sharing the valuable information. it’s really helpful. Who want to learn this blog most helpful. Keep sharing on updated tutorials…

    Best Devops training in sholinganallur
    Devops training in velachery
    Devops training in annanagar
    Devops training in tambaram

    ReplyDelete
  12. This comment has been removed by the author.

    ReplyDelete
  13. Hey, Really amazing..!
    I've bookmarked your post for reference and will love to follow you.
    Please keep it up good work for us.
    We provide a solution to use WhatsApp in your business communications and send invoices though tally.
    Tally WhatsApp API Integration
    Tally WhatsApp API

    Send Tally Invoices to WhatsApp

    ReplyDelete
  14. Sometime few educational blogs become very helpful while getting relevant and new information related to your targeted area. As I found this blog and appreciate the information delivered to my database.
    โคม ไฟ ถนน led

    ReplyDelete
  15. Di Situs IDN ini anda bukan hanya bisa bermain 1 macam permainan kartu saja. Tetapi anda bisa bermain berbagai macam kartu yang tersedia untuk anda. Seperti anda bisa bermain Ceme
    asikqq
    http://dewaqqq.club/
    http://sumoqq.today/
    interqq
    pionpoker
    bandar ceme terpercaya
    freebet tanpa deposit
    paito warna
    syair sgp

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete
  17. Nice Blog It is very informative to all. If you are required technical Support in Quickbooks. You can easily contacting us, on Quickbooks Payroll Support Phone Number 1800-986-4607. We provide the best support service to the user because our team members are highly enthusiastic who puts their whole effort in resolving issues.

    ReplyDelete
  18. These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post.sap s4 hana simple finance training in bangalore

    ReplyDelete
  19. Really very happy to say, your post is very interesting to read. I never stop myself to say something about it. You’re doing a great job. Keep it up…

    Upgrade your career Learn Oracle Training from industry experts gets complete hands on Training, Interview preparation, and Job Assistance at My Training Bangalore.

    ReplyDelete
  20. I absolutely love that it looks so beautiful on you This is a great post it was very informative. I look forward in reading more of your work. Also I made sure to bookmark your website. I enjoyed every moment of reading it. More info please visit :-
    Mobile Apps Development Company in Gurgaon
    IOS Apps Development Company in Gurgaon
    Android Apps Development Company in Gurgaon
    Software Company in Gurgaon
    Web Development Company Gurgaon
    Web Design and Development company in Gurgaon
    Web Designing Company in Gurgaon

    ReplyDelete
  21. I think you did an awesome job explaining it. Sure beats having to research it on my own. Thanks
    BCOM 1st, 2nd & 3rd Year Time Table 2020

    ReplyDelete
  22. Grab the deal and buy the best fitness band under 2000 get the best fitness tracker now and best tracker in India. best fitness tracker under 2000

    ReplyDelete
  23. If you are look for models, actors, dancers, singers have a look at artists on Kala. Browse through portfolio and hire perfect artist in India. acting auditions

    ReplyDelete
  24. Don't miss the offer on gifts. Buy gifts for sister, gifts for brother , gifts for parents, gifts for grandma and grandpa. gifts for parents

    ReplyDelete
  25. Consider these for the best grill microwave oven of best brand along with convection and
    solo Under 5000, 10000, 15000 in India. best microwave convection oven

    ReplyDelete
  26. Know what the trending news is going on all across. Know what is trending on social media and on other social media platforms. trending india

    ReplyDelete
  27. Feeling good to read such a informative blog, mostly i eagerly search for this kind of blog. I really found your blog informative and unique, waiting for your new blog to read.
    Digital marketing Service in Delhi
    SMM Services
    PPC Services in Delhi
    Website Design & Development Packages
    SEO Services Packages
    Local SEO services
    E-mail marketing services
    YouTube plans

    ReplyDelete
  28. hair transplantation methods If you are look for models, actors, dancers, singers have a look at artists on Kala.

    ReplyDelete
  29. Nice Blog...
    Thanks For sharing with us.
    by cognex is the AWS Training in Chennai. Offering both online and offline classes.
    click here to know more

    ReplyDelete
  30. Get the best budget fitness band in India and track each and every moment of your body Under 2000, 3000 to 5000. best fitness band in india under

    ReplyDelete
  31. Purchase the best convection microwave oven in India under 10000, 15000 and enjoy! best convection microwave oven

    ReplyDelete
  32. Sex stories which are not only sexy and hot but also very hot and amazing. Best sex
    stories of all time. Amazing fuck story and sexy Indian sex stories which are simply wow. Got my dick hard best sex stories. hindi sex stories

    ReplyDelete
  33. What’s Happening i’m new to this, I stumbled upon this I’ve discovered It positively helpful and it has helped me out loads.

    BCA Time Table - B.C.A I II III Ka Exam Routine 2022
    Cusat University Time Table 2022
    Datta Meghe University Time Table 2022
    JRRSU Exam Time Table 2022

    ReplyDelete
  34. Best AWS Training provided by Vepsun in Bangalore for the last 12 years. Our Trainer has more than 20+ Years
    of IT Experience in teaching Virtualization and Cloud topics.. we are very delighted to say that Vepsun is
    the Top AWS cloud training Provider in Bangalore. We provide the best atmosphere for our students to learn.
    Our Trainers have great experience and are highly skilled in IT Professionals. AWS is an evolving cloud
    computing platform provided by Amazon with a combination of IT services. It includes a mixture of
    infrastructure as service and packaged software as service offerings and also automation. We have trained
    more than 10000 students in AWS cloud and our trainer Sameer has been awarded as the best Citrix and Cloud
    trainer in india.

    ReplyDelete