Hi Everyone,

The reason Im posting this question is because I cannot make a
notification to reproduce a sound or a vibration sequence.

For the case of the vibration I have permissions properly set and
logcat do not show log message indicating a problem.

For the case of sound, I have an mp3 saved in the res/raw folder and I
always got an error saying: error loading sound in logcat.

I add an snipplet with the code I´m using. Probably anyone can let me
know if I am making a newbie mistake.

        Notification note=new Notification(R.drawable.red_ball, "Status
message!", System.currentTimeMillis());

        note.vibrate = new long[] {100,200,150};

        Uri uri = Uri.parse("android.resource://com.pp/" +
R.raw.test_cbr);
        note.sound = uri;

        PendingIntent i=PendingIntent.getActivity(this, 0,
                        new Intent(this, NotifyMessage.class), 0);

        note.setLatestEventInfo(this, "Notification Title", "This is the
notification message", i);

        mgr.notify(NOTIFY_ME_ID, note);

Where com.pp is the package of my application.

I will be more than glad if someone can be me a hint or a working
snipplet about reproducing sound, vibration and lights. There is
actually very few documentation about how to make notifications work
properly.

Thanks in advance, Pablo

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to