Programming the trackball light

by Boardy » Tue, 23 Mar 2010 01:51:48 GMT


Sponsored Links
 Hi all,

I am currently looking into developing an app for the android
platform. Before getting started on my app I have been going through
the development guide for android.

I was looking at flashing the trackball light when I perform a
notification event.

String ns = Context.NOTIFICATION_SERVICE;
        NotificationManager mNotificationManager = (NotificationManager)
getSystemService(ns);

        int icon = R.drawable.notification_icon;
        CharSequence tickerText = "Hello";
        long when = System.currentTimeMillis();

        Notification notification = new Notification(icon, tickerText,
when);

        Context context = getApplicationContext();
        CharSequence contentTitle = "My notification";
        CharSequence contentText = "Hello world!";
        Intent notificationIntent = new Intent(this, Hello.class);
        PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
notificationIntent, 0);

        notification.setLatestEventInfo(context, contentTitle,
contentText, contentIntent);
        notification.defaults |= Notification.DEFAULT_SOUND;
                long[] vibrate = {0, 500, 100, 200, 100, 500, 100,
500, 200, 500};
        notification.vibrate = vibrate;
                notification.defaults |= Notification.DEFAULT_LIGHTS;
        mNotificationManager.notify(HELLO_ID, notification);

I have put in notification.defaults |= Notification.DEFAULT_LIGHTS;
thinking that this was for the trackball LED but I think its the led
at the top of the phone, that one that lights up to show that its
charging.

How would I flash the light on the trackball. I have an HTC Hero.
Thanks for your help

--



Other Threads

1. OOT WTA yg pake handset android garansi lokal siapa aja yak..

Kalau garansi pribadi masuk lokal gak zik

*siu siul merem
Ichan nih. 
sent by jave aka jupe

-----Original Message-----
From: "Dzikki Muhammad" <dzikki.gad...@gmail.com>
Date: Tue, 4 May 2010 14:31:36 
To: Id-android<id-android@googlegroups.com>
Subject: [id-android] OOT WTA yg pake handset android garansi lokal siapa aja 
        yak..

Guys

Iseng malem 
As subject siapa aja yeh?

Pengen tau bamyak ga..


Salam
Dzikki 
k...@tux.or.id

-- 
"Indonesian Android Community [id-android]" 

2. Media gathering and launching HTC Legend, HD Mini dan HTC Smart

Dikau sedang bekerja yah reen disana ?
  ----- Original Message ----- 
  From: Nareen kameshwara 
  To: id-android 
  Sent: Wednesday, May 05, 2010 12:49 PM
  Subject: [id-android] Media gathering and launching HTC Legend, HD Mini dan 
HTC Smart


  Lagi hadir di launching 3 hh seperti yg saya sebut di subject. 

  Legend sempet coba tadi...hhmmm....

  Nanti saya update lagi. 

  send from big Hero, my Android phone


  -- 
  "Indonesian Android Community [id-android]" 
   
  

3. How to narrow down the method that is involved in exception from the pid

4. In process communication

5. Android monkey tool script

6. Media gathering and launching HTC Legend, HD Mini dan HTC Smart

7. Bluetooth error