BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 08-10-2006, 06:23 PM   #1
phil_doyle
Knows Where the Search Button Is
 
Join Date: Sep 2005
Model: 7520
Posts: 31
Default Playing Ringtone

Please Login to Remove!

I was wondering if there was a way for an application to alert the user using the device ringtone.

If the user has the ringtone set to vibrate, the application will alert the user by vibrating.
If the user has the ringtone as Ringtone A, the application will play RingTone A.
Offline  
Old 08-14-2006, 04:24 AM   #2
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

you can play ringtones but i did never find a method to access the user-profiles on this topic. if you stumble over anything let me know
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 08-14-2006, 12:11 PM   #3
phil_doyle
Knows Where the Search Button Is
 
Join Date: Sep 2005
Model: 7520
Posts: 31
Default

how were you able to make the application play a ringtone?
is it able to play out the speaker?

i used a code that played an audio, but i think it only came out of the earphone....
Offline  
Old 08-15-2006, 05:25 AM   #4
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

most of the work is to define your tune.

Code:
private static final short c    = 262;
    private static final short cis  = 277;
    private static final short d    = 294;
    private static final short dis  = 311;
    private static final short e    = 330;
    private static final short f    = 370;
    private static final short g    = 392;
    private static final short gis  = 415;
    private static final short a    = 440;
    private static final short ais  = 466;
    private static final short h    = 494;
    private static final short c2   = 523;
    
    private static final short TEMPO = 125;
    private static final short d16 = 1 * TEMPO;
    private static final short d8 = d16 << 1;
    private static final short d4 = d16 << 2;
    private static final short d2 = d16 << 3;
    private static final short dpause = 10;
    private static final short pause = 0;
    private static final short[] TUNE1 = new short[] {c*2, d16,
                                                      d*2, d16,
                                                      e*2, d16,
                                                      f*2, d16,
                                                      c*2, d16,
                                                      d*2, d16,
                                                      e*2, d16,
                                                      f*2, d16
                                                     };

Alert.startBuzzer(TUNE1, 100)
a code example, didn't write it myself though.

hth,
simon
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 08-15-2006, 04:44 PM   #5
phil_doyle
Knows Where the Search Button Is
 
Join Date: Sep 2005
Model: 7520
Posts: 31
Default

awesome
thanks so much!
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Motorola 68060 68EC060 MC68EC060RC75 CPU / Processor AMIGA unused, new USA stock picture

Motorola 68060 68EC060 MC68EC060RC75 CPU / Processor AMIGA unused, new USA stock

$69.99



New Greaseweazle V4.1 USB Floppy Adapter Flux Reader Writer Amiga PC Case 1598 picture

New Greaseweazle V4.1 USB Floppy Adapter Flux Reader Writer Amiga PC Case 1598

$36.20



New Greaseweazle V4.1 USB Floppy Adapter Flux Reader Writer Amiga Atari ST 1591 picture

New Greaseweazle V4.1 USB Floppy Adapter Flux Reader Writer Amiga Atari ST 1591

$28.73



New Amiga Gotek OLED IIC I2C 0.91

New Amiga Gotek OLED IIC I2C 0.91" 128x32 LCD Display Module 3.3V 5V White 679

$6.57



Camera for Laser Engraving Machine picture

Camera for Laser Engraving Machine

$186.67



Camera Precise Positioning Support Video Record for Acmer Laser Engraving picture

Camera Precise Positioning Support Video Record for Acmer Laser Engraving

$150.78







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.