Closed GoogleCodeExporter closed 9 years ago
I agree, this would help the usability quite a bit.
Original comment by emoll...@gmail.com
on 14 Nov 2007 at 4:18
From my experience of reading ebook in Palm machine, I think the volume buttons
of
iphone is too "hard" for frequent operation (page turning).Also, i am afraid
too
much using will make it to die earlier. Just my own opinion.
Original comment by penny...@gmail.com
on 17 Jan 2008 at 2:04
I have tried to do it but haven't found a way to receive events in the app when
the
volume buttons are pushed
Original comment by benoitce...@gmail.com
on 20 Jan 2008 at 3:57
Original comment by pendorbo...@gmail.com
on 17 Feb 2008 at 6:16
Original comment by pendorbo...@gmail.com
on 23 Feb 2008 at 7:02
The following code might help, although it still shows speaker icon.
--------------------- in EBookView.h
#import <Celestial/AVSystemController.h>
@interface EBookView : UITextView {
...
AVSystemController *avs;
float defaultVolume;
...
}
--------------------- in EBookView.m
#import <Celestial/AVSystemController.h>
...
@implementation EBookView
- (id)initWithFrame:(struct CGRect)rect {
...
avs = [AVSystemController sharedAVSystemController];
[[NSNotificationCenter defaultCenter] addObserver: self
selector:@selector(volumeChanged:)
name:@"AVSystemController_SystemVolumeDidChangeNotification" object: avs];
NSString *name;
[avs getActiveCategoryVolume:&defaultVolume andName:&name];
...
- (void)volumeChanged:(NSNotification *)notification
{
// INSERT HERE CHECK FOR GLOBAL PREFERENCE "USE_VOLUME_CONTROLS_TO_TURN_PAGES"
float volume;
NSString *audioDeviceName;
[avs getActiveCategoryVolume: &volume andName: &audioDeviceName];
NSLog(@"Volume changed: %f",volume);
if (volume != defaultVolume) {
if (volume > defaultVolume) {
[self pageUpWithTopBar:NO bottomBar:![defaults toolbar]];
} else {
[self pageDownWithTopBar:![defaults navbar] bottomBar:NO];
}
[avs setActiveCategoryVolumeTo: defaultVolume];
}
}
Original comment by sergemak...@gmail.com
on 14 Apr 2008 at 3:16
None of that API is public in the SDK. We're not going to add code now that
would
have to be yanked in a few months.
Original comment by pendorbo...@gmail.com
on 4 May 2008 at 10:03
oops,
I have actually added it. In the svn version.
We may not be able to redo it in the sdk but I think it will be nice.
Original comment by benoitce...@gmail.com
on 30 May 2008 at 3:19
Original issue reported on code.google.com by
sca...@gmail.com
on 5 Nov 2007 at 12:28