ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.63k stars 2.23k forks source link

Feature request: Skip cards with audio #4601

Closed Wabuo closed 1 year ago

Wabuo commented 7 years ago

Add a no headphone/mute button to disable/ignore all cards with sound.

For example let's say I forgot my headphones and decide to still learn on the bus but don't want to annoy the other passengers so I mute my phone. Now it would be nice if Ankidroid wouldn't include/ignore all cards with sound for this lesson. So that I can still train without spoiling my statistics.

HopperKremer commented 7 years ago

I second this feature, it would be more convenient than having to mute my phone. What do you mean by "spoiling" your statistics though?

Wabuo commented 7 years ago

@hopperkremer Well its impossible to actually do the cards that require sound, so I just answer wrong so that I get them again soon when I hopefully have Headphones with me because I couldn't find a way to jump to the next card without answering. This “wrong” answers of course spoil the statistics.

HopperKremer commented 7 years ago

Ahh... I see. That's a pain if they're mixed in. I recommend assigning an easy gesture in your settings to "bury note", that way you can study those cards another time.

eginhard commented 7 years ago

You can "bury" a card (see the manual: https://apps.ankiweb.net/docs/manual.html#editing-and-more), which will hide a card/note until the next day or until you "unbury" your cards. If you need that action frequently and find it inconvenient to access it from the overflow menu, you can move it into the app bar via "Settings -> Reviewing -> App bar buttons".

HopperKremer commented 7 years ago

@eginhard Adding it to the app bar could be a good option. Just beware of unburying when Anki is auto-hiding some cards from a note type.

Wabuo commented 7 years ago

@hopperkremer Thx nice to know, this works as a workaround!

I would still prefer if there would be a setting to enable so that this could be done automatically if no headphone is detected/the phone is muted. And some kind of button/menu entry to trigger this in the beginning of a lesson.

HopperKremer commented 7 years ago

I think you could also tag and filter your cards with audio.

glutanimate commented 7 years ago

I have to agree with @Wabuo: An option to only play audio when headphones are connected would be greatly appreciated. Quite a few of my cards have audio playing on the front. Burying does not work in those cases, so I have to keep these cards in separate deck. This works fine, but I'd much rather have them in the same deck as the rest of my cards, burying them when needed.

Also, even if you do move all audio cards into a separate deck (or filter them), misclicks do happen and an option to mute speaker audio would be a boon in those situations.

eginhard commented 7 years ago

@Glutanimate You can already mute the speakers via your phone, no option for that needs to be added. The request is rather concerned with skipping/burying cards with audio until a later review.

I agree that this can be useful on a phone. But maybe filtered decks are already sufficient as suggested above? You could use a search string like deck:MyDeck -"[sound".

glutanimate commented 7 years ago

Automatically burying or skipping the cards when no headphones are connected would be a neater solution of course. I just thought a setting to mute audio might be easier to implement.

As for muting the phone: Yes, but at least on my phone the line volume and speaker volume can't be controlled individually. So I often end up in situations where my media volume is turned up because I used my phone with headphones plugged in previously. Yes, this has nothing to do with AnkiDroid directly, but it would be nice not to have to worry about audio playback when I unlock my phone after having used AnkiDroid.

Just to chime in on filtered decks: They're not a bad solution by any means, but they do come with a lot of caveats (e.g. resetting cards in the learning queue) and might be hard to understand for new users.

Wabuo commented 7 years ago

To the point about new users: I would consider my self still as a “new” user after using this app the desktop and the web version for a few years just because I never found the time to dig deeper. I think the filtered list dos the trick but I had to open this issue to get the information because of this I support some kind of wrapper to automate this.

Edit: One other problem I have with Filtered lists is that if I manually have to unbury some cards I will also unbury all the automatically burid card e.g. the siblings.

And there is still the issue with audio on the front if there really is no way of burring them as @Glutanimate mentioned.

Or another solution could be to make it possible to trigger some filters automatically if some condition is met.

mikehardy commented 6 years ago

This one bit me yesterday - I was using my phone to play through the room speakers via bluetooth, and had some time in the meanwhile to study Anki - but the deck I was most behind on was images and audio that auto-plays - no go!

I could have studied it just fine with no audio, so for me the use case is mute (or disable auto-play) for audio as a toggle.

I can see how some cards won't work without audio though, so a second option could be to handle that somehow - with a toggle that auto-skips an audio card, or maybe a "skip card" feature (like bury, but only for the current review session?) that you could use in combo with auto-play disabled so you don't play audio and don't mess up statistics.

@timrae any thoughts on what an acceptable PR would look like here? At least for a disable-auto-audio-play feature? Then maybe as a second pass to enable skipping completely...

timrae commented 6 years ago

Maybe a custom study shortcut would work instead?

mikehardy commented 5 years ago

Fresh idea that can work now here: https://github.com/ankidroid/Anki-Android/issues/996#issuecomment-548060297

markhavemann commented 4 years ago

I use Anki every day on the bus or subway. Previously I had an iPhone and sounds would play automatically on the Anki app, but if I forgot to plug in my headphones they wouldn't.

Switching to Android I'm constantly worried that my audio will play out loud when I forget to plug in my headphones (Having audio of a foreign language blurt out of your phone when you are in a bus full of native speakers can be quite embarrassing).

This seems to be a basic feature in the official app on iPhone, such a pity its missing here.

mikehardy commented 4 years ago

I maintain the device-info module for the react-native ecosystem, and this code was proposed as a PR over there to detect headphones on Android:

public boolean isHeadphonesConnectedSync() {
    AudioManager audioManager = (AudioManager)getReactApplicationContext().getSystemService(Context.AUDIO_SERVICE);
    return audioManager.isWiredHeadsetOn() || audioManager.isBluetoothA2dpOn();
  }

The same API skew (Android API15+) is supported there so it's possible here.

If someone wanted to add a preferences toggle for this and use the preferences setting in combination with the code above to disable audio, I'd be interested.

github-actions[bot] commented 4 years ago

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

david-allison commented 4 years ago

I feel there's enough community interest in the thread above to keep this open long-term.

dae commented 1 year ago

AnkiMobile won't autoplay audio when the device's mute switch is on. Is something similar possible in Android?

BrayanDSO commented 1 year ago

I guess that the request is to not show cards which have audio if the device is muted. Probably not possible, would take a lot of work, and would be prone to issues.

My suggestion is to create a tag for the audio cards and filter them out