BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-10-2006, 06:23 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2005
Model: 7520
Posts: 31
Post Thanks: 0
Thanked 0 Times in 0 Posts
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 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
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 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2005
Model: 7520
Posts: 31
Post Thanks: 0
Thanked 0 Times in 0 Posts
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 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
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 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2005
Model: 7520
Posts: 31
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

awesome
thanks so much!
Offline  
Closed Thread


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

DEC4015P Raytheon 16 DIP IC DEC4015 - Vintage 1974 NOS Qty 1
$9.99
DEC4015P Raytheon 16 DIP IC DEC4015 - Vintage 1974 NOS Qty 1 pictureHSS 12PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP
$164.99
HSS 12PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP pictureVintage 1991 Gamefowl - Old Collectible Book - Nov. & Dec. magazine
$12.0
Vintage 1991 Gamefowl - Old Collectible Book - Nov. & Dec.  magazine pictureVintage Wilton bullet vise 930 unrestored original first run built Dec.1941
$499.97
Vintage Wilton bullet vise 930 unrestored original first run built Dec.1941 pictureHSS 10PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP
$152.99
HSS 10PCS VALVE SEAT & FACE CUTTER 45DEC 30DEC 20DEC FOR VINTAGE CAR, BIKES,JEEP picture






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