Giter Site home page Giter Site logo

flackbash / audioanchor Goto Github PK

View Code? Open in Web Editor NEW
216.0 14.0 40.0 3.96 MB

Android audio player that tracks the listening progress of your audio books and podcasts

License: GNU General Public License v3.0

Java 99.33% Kotlin 0.67%
audiobook-player android audiobook audio-player

audioanchor's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

audioanchor's Issues

Sleep timer quick buttons

currently if you press on the sleep timer icon you get a dropdown with a textbox where you can enter an integer, which is enough but it could be handy to have 1-4 buttons next to the text field which have predefined (maybe even configurable) values. lets say we have 15, 30, 60, 90 so i press on the 30 button and have 30mins of sleep timer.

Allow to boost volume

The main reason stopping me from using your app at the moment is the fact that audio output is too silent even at 100% on my device. Other players allow to increase the volume to a higher level.

Feature request: dark theme

While I like the current theme, it is very bright when used at night. This is also in line with the modern dark-theme apps trend :).

Sleep timer does not work if playback has not been started

The sleep timer does not work if it is being started before starting the playback for the first time after opening the PlayActivity.
After having started the playback, everything works fine, even after pausing the playback.

This is because the music player service is only started once the playback has been started for the first time. However, the music player service is needed for the sleep timer to work.

Make settings accessible from AlbumActivity and/or PlayActivity

It can be annoying having to navigate back through the MainActivity to get to the settings. Especially for settings like autoplay that one might want to adjust frequently.
It would be nice to have the settings accessible from the AlbumActivity or maybe even from the PlayActivity.

Playing m4a files causes strange app behavior

I have three albums, in separate directories, whose songs are all in m4a format. When I try to play one, starting with the first track, the app seems to zoom through all the tracks without playing them. Once it gets to the last track, the app freezes, not responding to any input. I can't even hit Back to close the app.

I get the same experience for any one of these albums.

According to this github site, the app supports the m4a filetype.

VLC Media Player plays these files without error.

I am using a Motoral Moto E4, running Android 7.1.1. The problematic albums are saved to the SD card, not the internal storage.

Automatically continue playback after navigation/alarm interrupts

Currently, it seems if an alarm or navigation (eg. OsmAnd) interrupts AudioAnchor, it will stop the playback. It also seems to get confused on the playback state, still showing the pause icon even though playback is already paused. This causes some bugs when trying to resume playback.

It would be nice to either always continue playback automatically or add an option to do that.

Some possible use cases:

  1. Alarm/timer interrupt.
  2. OsmAnd (periodic) navigation.
  3. Some sports apps allow periodic status audio, which probably interrupts the same way.

Otherwise the app seems to be working fine, thanks!

Sleep timer enhancements

I would like to propose the following two new features to enhance the sleep timer.

1) Shake to reset timer

  • Shaking the phone resets the sleep timer
  • Force required to reset the timer is adjustable

2) Adjustable fade-out

  • It's possible to adjust the fade-out time

I'm willing to implement both features as two separate pull requests. But I want to make sure that those features are aligned with your vision.

Selection of SD-Card = crash

Expected behaviour:
Select music folder on SD-Card as primary music folder.

What happens (everytime):

  1. Open AudioAnchor
  2. Click on bread crumbs -> "choose library"
  3. music folder on main storage is shown, bc it was automatically set as music folder
  4. I press 2 times on "..." to go up in the folder hierarchy
  5. As I press the second time on "..." I expect to go from "/0/emulated/" to "/0/" to be able chose the SD-Card, but...
  6. App crashes instantly without any message or lag
    --
    Device:
    Galaxy S9
    ...
    Idea:
    Permissions to access the sd card? Some other apps also cannot write to sd card, but only a few.

Thanks in advance

Awesome App btw! Every music app should have your track progress function integrated.

Add support for .aac files

Currently .m4a files are supported, but files with .aac as filename extension are not recognized by the player.
When changing filename extension from .aac to .m4a these files are recognized and well played.
So for me it seems that only the filename extension needs to be enabled as supported file type.
Could you add support for .aac?

[Feature Request] UI improvements & some functions

Hi, I have been looking for an application like yours for a long time, this is what I need and what I have been looking for for a long time. All that is missing is the function to delete the file.
I also noticed that can slightly improve the interface to make it even more convenient.

  1. Improving the main layout. Сan move the menu button to the left, and to the right place the button for switching to the player (last playback).
  2. Improving the folder layout. The settings button can be replaced with the switching button to the player.
  3. Delete files. It would be cool to delete files after listening. This can be done by swiping right to the folder or file, it would be very convenient.
  4. Volume. It would be great to also change the volume so that do not need to call up a Android dialogue.
  5. The colors seem too bright, it would be great to have more calm colors, so that in the evening it would be more comfortable to use the application. Сan use these colors.

I drew an example concept for clarity. Apple uses the same ideas in its podcast application and it seems very convenient.

Thanks for this good app.

App crashes when long press on a file

Hey again!

As I've said, there is another issue.

Reproduce: Open app -> click on a book (its a folder) -> long press on a file -> app crashes with a popup "audioAnchor has stopped" and only option "open app again".

I know, I shouldn't long press files because that option is not implemented... never the less, it shouldn't crash the app. I think :)

Maybe it's only my device and my file...

When I'm on the subject, you could maybe also implement option "send bug report" so ppl can send you logs and device info with one click. I've seen that option with other apps. When app crashes (just as your did) there are two options "open app again" and "send report". That's useful.

My device is: Sony XZ1 compact. Sony rom.
I didnt modify device in any way. Androidd 8.0.
AudioAnchor: v1.9

That's all for now. I hope it helps. C ya!

File metadata store by file hash instead of filename

if you switch phone or change the directory structure of your files you will loose all your bookmarks and progress. if it would be possible to (alternatively) store the metadata by hashed filecontent instead of path, everything can be kept even if i move around my files. php reference function https://www.php.net/manual/en/function.hash-file.php

another alternative could be to store data in the mp3 id tags or simply in multiple files named for example audiofilename.json next to each audio file.

Start playing when item is selected

Right now, AudioAnchor seems to play a file only after hitting the play button. Most other players, in my experience, start playing as soon as you tap on a file. Could we have this as optional behavior?

Feature request: unpouse to rewind

Hey! Nice app!

There's something, maybe useful, that you could implement.

It would be nice if app would have automatically rewind few seconds when I resume playback. (The number of seconds previously set by user; 0 as default).

Reasoning: I'm just listening to a book. And I find myself pushing pouse very frequently (I need to translate some words i don't understand) and when i resume, all I need is few last seconds to catch the thread of thoughts. I know there is rewind button in notification for 30 sec rewind, but that's to much. Even 10 sec is to much if I pouse the book frequently.

Specially, If I was listening to a book while my phone was in the pocket and I play/pouse with the remote control on my headphones. Then, rewind button is out of the reach.

:) Tnx

Option for sleep timer

Hi,
could you add an option for the sleep timer, which stops playback not where you are at the end of the counter, but at the end of the file? Sometimes I don't want to end in the middle of a 5 minute file.
That would be great, because I really like your app.

Support for audio files without folder

Currently the player recognizes audio books only when the files are in a subfolder of parent directory.
As most of my audio books are single files, it's quiet boring to create for each file an own subfolder. It would be very nice when the player has support for single files parent directory.
Or is this already possible and I do not use it in the right way?

AudioAnchor forgets current playback position

I expect AudioAnchor to remember position at which I left playback of each file.

Actually after resuming playback I often find AudioAnchor playing from not the last position at which this file was paused, but penultimate pause position or even just the start of the file.

The last time this happened I noticed that in list of files current position was still displayed properly as 20:20 - where I actually paused the file, though it was playing from the start, but once I pressed "pause" it resetted to the actual current position, ~00:10. I'm not sure of this observation.

Add support for .m4b

AFAIK .m4b files are the same as .m4a except devices like iPod parse them as books. My .m4b files seem to play fine in AudioAnchor as long as I rename them to .m4a, otherwise they aren't recognized.

It could save newbs some annoyance and the rest of us an unnecessary launch of the file manager :)

[Help] Am I syncing wrong?

Hi,

Sorry for the clickbaity title but when exporting the database or 'syncing' nothing happens.

The fine audioanchor.db exists but when I read it with a sql reader it shows nothing. and when I import it on another device the position does not sync or the bookmarks.

Am I missing something?

Info if sleep timer is running

if you start the sleep timer there is no info about that it is running nor how long it will be running. would be nice to have such a thing

Add an About screen

It would be nice to have an About screen in the menu, to see version number, link to GitHub etc.

Install instructions

If you wish, you can also point out that your app can be installed using the F-Droid client when adding my repo. I've just added your app there (hope that's OK with you) – and as long as you keep on tagging releases and attaching the APK to them, those updates will automatically be available to users having it installed that way within ~24h (and they will be notified about the available update).

As it looks that your app would be perfectly meeting the inclusion criteria of the official F-Droid repo: if you want to have it listed there, let me know – and I'll gladly assist you getting it there.

Thanks for your app!

Scrolling down in audio book file list

At the moment AudioAnchor doesn't remember the last position in the file overview of each audio book. It would be nice, if AudioAnchor could jump to the last file, which played.

The app crashed when I tried to open a song multiple times.

Expected behavior

I expected that I could open a song multiple times without getting any trouble.

Actual behavior

When I tried to open to play a song for a few times, then the app crashed.

How to reproduce

Here is every possible detail to reproduce the bug.

  1. Open the app.
  2. Choose a directory and try to play a song.
  3. Then press the back button and try to open that song again. (Repeat this step for a few times.)
  4. Notice the crash.
  • App version: 1.8.1
  • Operating system: Android 6.0.1

Recording Of The Bug

bug

LogCat

06-25 11:57:37.781 23184 23184 D AndroidRuntime: Shutting down VM

06-25 11:57:37.781 23184 23184 E AndroidRuntime: FATAL EXCEPTION: main

06-25 11:57:37.781 23184 23184 E AndroidRuntime: Process: com.prangesoftwaresolutions.audioanchor, PID: 23184

06-25 11:57:37.781 23184 23184 E AndroidRuntime: java.lang.OutOfMemoryError: Failed to allocate a 23040012 byte allocation with 6395496 free bytes and 6MB until OOM

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at dalvik.system.VMRuntime.newNonMovableArray(Native Method)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:856)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:675)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:703)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:733)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at com.prangesoftwaresolutions.audioanchor.MediaPlayerService.updateMetaData(MediaPlayerService.java:491)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at com.prangesoftwaresolutions.audioanchor.MediaPlayerService.initMediaSession(MediaPlayerService.java:401)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at com.prangesoftwaresolutions.audioanchor.MediaPlayerService.onStartCommand(MediaPlayerService.java:155)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4128)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at android.app.ActivityThread.access$2400(ActivityThread.java:229)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1924)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7325)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

06-25 11:57:37.781 23184 23184 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Natural Sorting

currently items are not sorted by natural sort which leads to:

item episode 0 promo
item episode 1 stardust
item episode 10 the secret of mystic mountain
item episode 11 ...
...
item episode 19 ...
item episode 2 ...
item episode 20 ...

i assume that #5 was already released, i am currently on version 2.2 but i also asume that the CAST fix only work for numbers at the beginning and the end (or do i miss something?).

maybe helpful:

maybe a fix:

Behavior: audio books with more than 100 files

My audio books consist of more than 100 files and have the following naming scheme: number - name.file format
Whenever I reach the tenth file, the player jumps to file number 100, so it skips files 10-99.
A inconvenient workaround is to add three digits to the numbers in the file name.
Is there a possibility to fix this?

PS: Thanks for your help with the sleep timer. I look forward to it :)

[Feature Request] Audiobook chapters

The M4B format supports chapters and chapter images. iTunes does this for audiobooks. I would love if I were able to see which chapter I was on when listening to an audiobook and to easily hop between chapters. Possibly chapter markers and names popping up when scrobbling, sort of like the new YouTube chapter feature if you've seen that.

Suggested Fix for Bug on API 26: Playback glitches back when starting from stored position

Hey there,
thank you for this App!

I am new to Android-Development and cloned your code as a learning project.
When I started playing around with it I realized using my Phone (API 26) that the playback sometimes glitches back to the nearest full ten seconds (e.g. starting from 2:35 it goes to 2:30 or from 3:27 to 3:20). It happens when starting from a stored position, when jumping back/forward or when using the seekbar (so basically every time a mMediaplayer.seekTo(msc) is called). This could be replicated with a different phone (also API 26). The App didn't show this behaviour when run on a phone with API 25.

Since I'm learning here I jumped right in trying to find a solution and got something that now works for both API 26 and below. To keep up with etiquette I wanted to raise this issue beforehand and if it is appreciated I'd like to submit a PR on this.

Note again that I'm not experienced (as not to say a noob...) but I'd highly appreciate feedback on my solution.

happy coding!
best
Lotl

Add landscape support

Can you add support for using the app in landscape?

Many thanks for this app and for making it open source.

[Feature request] libspeex support

Hello!

First I'd like to thank you for this very lightweight and handy Android player!

I have not been able to find any information about which audio codecs AudioAnchor is able to read and I thought that libspeex, a very efficient and widely used open audio library would be one of them, but it seems it isn't the case.
It's contained by OGG and the encoder is a bit faster than that of libopus (which is why I use it a lot).

I think it could be a great addition.

Thank you for your work!

Scrolling lags due to loading of cover images

When the base directory contains several albums, scrolling through them is often lagging because the cover image bitmaps for each album need to be loaded into the image view.
Implementing a cache in c15cf59 helps when scolling up and down several times within a short period of time such that the images can be retrieved from the cache.
However, when scrolling for the first time upon starting the app, scrolling still lags. The solution to this is probably loading images asynchronously.

Replay completed files when autoplay is enabled

Right now, when autoplay is enabled, files that have previously been completed are skipped.
I think in most cases the completed files should probably be played again from the beginning, too, but I'm not sure. If so, one might also want to play files in the autoplay queue from the beginning again - not only those that have been completed but also those that have been started but not been completed yet.

Maybe the best would be to add an option for when autoplay is enabled that let's the user decide whether to play all files in the autoplay queue from the beginning again or whether to always start from the last position as is the case now (i.e. skip completed files).

If anyone else has a thought on this I'm eager to hear it.

Support Sub-directories

I installed Version 2.0 and chose a directory with the file folders of two different Podcast fetcher apps. One app stores all files in one folder, the other APP uses subdirs for each subscription. The episodes of latter do not show up in AudioAnchor.

[Feature Request] Additional Sleep Timer - audio book to night music transition

currently the sleep timer is a normal sleep timer which simply stops playing after a given time.

my idea/wish would be a little bit different: if you want to fall asleep with an audio book but want to sleep with white noise/relaxing noises like water sounds or wood sounds it would be awesome to have a special timer that can be set and after the timer finished the sound just not stop but jumps to a different folder (audio book).

lets say we have the following folder structure, having 3 audio books (2 "real" audio books and 1 wood noise "audio book".
a config section where the "music timer" folder can be set would be handsome. setting the "music timer" to 30 minutes in the while listening to "php done right" and previously set the "music timer" folder to "wood sound 1h" the php done right would be played for 30min and then wood sound 1h would be played for the rest of the night (as long as nobody press stop or the battery is empty).

audio books:
    php done right
        chapter1.mp3
        chapter2.mp3
        chapter3.mp3
        ...
    perry rhodan
        chapter1.mp3
        chapter2.mp3
        chapter3.mp3
        ...
    wood sound 1h
        wood.mp3      

i would be more than happy to have such a feature.

Sorting is wrong

Thanks for the app.
May you please fix sorting of the files? I think this happens for more than 9 files.
Screenshot_20190507-184731

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.