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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to