Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Changing notification sound

Changing notification sound

All your problems with Audio, Video and Images.

Changing notification sound

Postby alexm » Wed Jan 19, 2011 2:37 pm

What is the simplest way to change the notification sound. I have the following.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.                 Notification notification = new Notification(
  2.                                 R.drawable.icon,
  3.                                 contentTitle,
  4.                                 System.currentTimeMillis()
  5.                 );
  6.                 notification.sound = URI
Parsed in 0.011 seconds, using GeSHi 1.0.8.4


But how do I set the URI? Do I have to write a content provider just to give access to the sound file that comes with the app?
alexm
Junior Developer
Junior Developer
 
Posts: 14
Joined: Tue Jun 22, 2010 7:34 am

Top

Re: Changing notification sound

Postby alexm » Wed Jan 19, 2011 2:51 pm

turned out to be simple enough, just needed to refer to the correct resource

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Uri uri = Uri.parse("android.resource://com.example.app/raw/sound");
Parsed in 0.010 seconds, using GeSHi 1.0.8.4
alexm
Junior Developer
Junior Developer
 
Posts: 14
Joined: Tue Jun 22, 2010 7:34 am

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: Google [Bot] and 4 guests