0
iPhoneの音量を5/10の値に設定しているとしましょう。私のアプリが0%から100%、100%が5/10になる音量を上げたいユーザーによって)。私はその行動を、例えば20秒間ゆっくりと増やしたいと思っています。アプリの出力の音量を上げる
私が正しく理解している場合、アプリケーションはユーザーが設定した最大音量出力の値を超えることはできません。
残念ながら、私はそれを行う方法を見つけることができませんでした。私はその仕事をどこから始めるべきですか?
私は警報を出したい。
私は以下のロジックを使用してプッシュ通知を送信し、そのユーザーを「起床」します。
- (void)sendLocalPushForAlarm {
if (IS_OS_8_OR_LATER) {
[self registerForLocalNotification];
}
UILocalNotification *notification = [[UILocalNotification alloc] init];
[notification setAlertBody:NSLocalizedString(@"WAKE_UP", nil)];
if (IS_OS_8_OR_LATER) {
[notification setCategory:NotificationCategoryIdent];
}
[[UIApplication sharedApplication] presentLocalNotificationNow:notification];
}
ないだろう異なる音量レベルで記録された複数の音声ファイルで複数の通知があります。 if([AVAudioSession sharedInstance] .category!= AVAudioSessionCategoryPlayback){ [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlaybackエラー:なし]; [[AVAudioSession sharedInstance] setActive:はいエラー:なし]; [[UIApplication sharedApplication] beginReceivingRemoteControlEvents]; [self becomeFirstResponder]; –
ああ私はそれが正しいとは思わなかった。もう一度アプリに入ったときに通知後にサウンドを再生しますか? –
はい、私は0%から100%に増やしたいと思っていますが、今は100%から始めました:) –