{"id":21702821,"url":"https://github.com/mergehez/argplayer","last_synced_at":"2025-04-12T14:51:30.348Z","repository":{"id":19671140,"uuid":"87618770","full_name":"mergehez/ArgPlayer","owner":"mergehez","description":"An android music player library","archived":false,"fork":false,"pushed_at":"2022-06-11T16:48:47.000Z","size":29112,"stargazers_count":69,"open_issues_count":5,"forks_count":23,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-26T09:21:26.511Z","etag":null,"topics":["android","android-music-player","library","music-player","music-player-ui","player","ui"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mergehez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-08T08:14:03.000Z","updated_at":"2025-02-04T22:52:21.000Z","dependencies_parsed_at":"2022-08-18T01:05:59.535Z","dependency_job_id":null,"html_url":"https://github.com/mergehez/ArgPlayer","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mergehez%2FArgPlayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mergehez%2FArgPlayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mergehez%2FArgPlayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mergehez%2FArgPlayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mergehez","download_url":"https://codeload.github.com/mergehez/ArgPlayer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586270,"owners_count":21128995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-music-player","library","music-player","music-player-ui","player","ui"],"created_at":"2024-11-25T21:20:12.972Z","updated_at":"2025-04-12T14:51:30.328Z","avatar_url":"https://github.com/mergehez.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArgPlayer\nAn android music player ui library\n\nBuilds: [![](https://jitpack.io/v/mergehez/ArgPlayer.svg)](https://jitpack.io/#mergehez/ArgPlayer)\n\n## Table of Contents\n* [Installation](#installation)\n* [How to Use](#how-to-use)\n\t* [XML Codes](#xml-codes)\n\t\t* [Small View](#for-small-view)\n\t\t* [Large View](#for-large-view)\n\t\t* [Full Screen View](#for-full-screen-view)\n\t* [Simplest Usage](#simplest-usage)\n\t\t* [Play Simple Audio](#play-simple-audio)\n\t\t* [Play Playlist](#play-playlist)\n\t* [Player Methods](#player-methods)\n\t* [ArgAudio Methods](#argaudio)\n\t* [ArgAudioList Methods](#argaudiolist)\n\t* [ArgNotificationOptions Methods](#argnotificationoptions)\n* [ScreenShots](#screenshots)\n\n## Installation\nTo always build from the latest commit with all updates. Add the JitPack repository:\n\n(path:\\to\\your\\projects\\MainFolderOfYourProject\\build.gradle)\n```\n\nallprojects {\n    repositories {\n    \t...\n\tmaven { url \"https://jitpack.io\" }\n    }\n}\n```\nSet minSdkVersion to 21 and add the following dependency:\n\n```\nandroid{\n  ...\n  defaultConfig{\n    ...\n    minSdkVersion 21\n    ...\n  }\n}\ndependencies {\n    implementation 'com.github.mergehez:ArgPlayer:v3.1'\n}\n```\n\n\u003e Note: You may encounter the error below. See this stackoverflow question: [link](https://stackoverflow.com/questions/69163511/build-was-configured-to-prefer-settings-repositories-over-project-repositories-b) \u003cbr/\u003e\n\u003e `Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'build.gradle'`\n\n## How to use\n\n### XML Codes\n#### for small view:\n```xml\n\u003ccom.arges.sepan.argmusicplayer.PlayerViews.ArgPlayerSmallView\n\tandroid:id=\"@+id/argmusicplayer\"\n\tandroid:layout_width=\"match_parent\"\n\tandroid:layout_height=\"wrap_content\"/\u003e\n```\n#### for large view:\n```xml\n\u003ccom.arges.sepan.argmusicplayer.PlayerViews.ArgPlayerLargeView\n\tandroid:id=\"@+id/argmusicplayer\"\n\tandroid:layout_width=\"match_parent\"\n\tandroid:layout_height=\"wrap_content\"/\u003e\n```\n#### for full screen view:\n```xml\n\u003ccom.arges.sepan.argmusicplayer.PlayerViews.ArgPlayerFullScreenView\n\tandroid:id=\"@+id/argmusicplayer\"\n\tandroid:layout_width=\"match_parent\"\n\tandroid:layout_height=\"wrap_content\"/\u003e\n```\n\n----\n### Simplest Usage\n#### Play Simple Audio\n```java\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n\t//... other codes ...\n\tString url = \"https://www.gotinenstranan.com/songs/joan-baez-north-country-blues.mp3\";\n\tArgAudio audio = ArgAudio.createFromURL(\"Joan Baez\", \"North Country Blues\", url);\n\n\tArgPlayerSmallView argMusicPlayer = (ArgPlayerSmallView) findViewById(R.id.argmusicplayer);\n\targMusicPlayer.play(audio);\n\t//... other codes ...\n}\n```\n####  Play Playlist\n\n```java\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n\t//... other codes ...\n\tArgAudio audio1 = ArgAudio.createFromURL(\"Joan Baez\", \"North Country Blues\", url1)\n\t//Define audio2, audio3, audio4 ......\n\tArgAudioList playlist = new ArgAudioList(true).add(audio1)\n\t\t\t\t\t\t.add(audio2)\n\t\t\t\t\t\t.add(audio3)\n\t\t\t\t\t\t.add(audio4);\n\n\tArgPlayerSmallView argMusicPlayer = (ArgPlayerSmallView) findViewById(R.id.argmusicplayer);\n\targMusicPlayer.playPlaylist(playlist );\n\t//... other codes ...\n}\n```\n----\n\n\n\n#### Player Methods\n| Return | Method/Description |\n| :-- |:--|\n| void |`play(ArgAudio audio)` \u003cbr\u003eDirectly plays an audio|\n| void |`playPlaylist(ArgAudioList list)` \u003cbr\u003eDirectly plays a playlist|\n| void |`loadSingleAudio(ArgAudio audio)` \u003cbr\u003eLoads an audio to play later|\n| void |`playLoadedSingleAudio()` \u003cbr\u003ePlays the loaded audio if exists|\n| void |`loadPlaylist(ArgAudioList list)` \u003cbr\u003eLoads a playlist to play later|\n| void |`playLoadedPlaylist()` \u003cbr\u003ePlays the loaded playlist if exists|\n| void |`pause()` \u003cbr\u003ePauses a playing audio|\n| void |`resume()` \u003cbr\u003eResumes the playing audio|\n| void |`stop()` \u003cbr\u003eStops audio|\n| boolean |`seekTo(int millisec)` \u003cbr\u003eSeeks audio to *milliSec*\u003cbr\u003e **return**: if seeking position is greater than duration or less than 0, it returns *false*|\n| boolean |`forward(int milliSec, boolean willPlay)` \u003cbr\u003eForward audio as long as *milliSec*\u003cbr\u003e*`willPlay:`* if audio will play after forwarding, set this *true*\u003cbr\u003e **return:** If forwarding position is greater than duration, it returns *false*|\n| boolean |`backward(int milliSec, boolean willPlay)` \u003cbr\u003eBackward audio as long as *milliSec*\u003cbr\u003e*`willPlay:`* if audio will play after backwarding, set this *true*\u003cbr\u003e **return:** If backwarding position is less than 0, it returns *false*|\n| ArgAudio |`getCurrentAudio()` \u003cbr\u003eGets the current audio if available|\n| long|`getDuration()` \u003cbr\u003eGets duration of current audio|\n| boolean|`isPlaying()` \u003cbr\u003eChecks if an audio is playing|\n| boolean|`isPaused()` \u003cbr\u003eChecks if an audio is paused|\n| void |`playAudioAfterPercent(int percent)` \u003cbr\u003eAudio plays as soon as %`percent` is buffered. Only when audio type is Url. *Default percent is **%50**.* |\n| void |`enableProgress()` and `disableProgress()` \u003cbr\u003e Enable/Disable Progress View. *As default is **enabled***|\n| void |`setProgressMessage(String message)` \u003cbr\u003e Change Progress View message. *Default message is **'Audio is Loading..'***|\n| void |`enableErrorView()` and `disableErrorView()` \u003cbr\u003eEnables/Disables Error View. Error view appears when an error occurs. *Default value is **enabled*** |\n| void |`enableNextPrevButtons()`and `disableNextPrevButtons()` \u003cbr\u003e Enables/disables next/previous playback control. *Default behavior is **enabled***|\n| void |`enableNotification(Activity activity)` \u003cbr\u003eEnables notification.  Look at screenshots..\u003cbr\u003e*`activity:`* Current activity (You'd probably pass **this** keyword). |\n| void |`enableNotification(ArgNotificationOptions options)` \u003cbr\u003eEnables notification with custom options such as image, channel name etc. \u003cbr\u003e*`options:`* An ArgNotificationOptions instance.  |\n| void |`disableNotification()` \u003cbr\u003e Disable notification option. If notification was enabled before, it will be cancelled. *Default value for Notification is **disabled***|\n| void |`continuePlaylistWhenError()` \u003cbr\u003eIf an error occures, player won't publish error and will play next audio. |\n| void |`stopPlaylistWhenError()` \u003cbr\u003eIf an error occures, player will stop playing and publish error. *As default **player publishes errors***.|\n| void |`setPlaylistRepeat(boolean repeat)` \u003cbr\u003eSets repetition of the playlist. *Default value is **true***|\n| void |`setAllButtonsImageResource(int resIdPlay,int resIdPause,int resIdPrev,int resIdNext,int resIdRepeat,int resIdNotRepeat)` \u003cbr\u003e You can change image resources of all control buttons by this method.|\n| void |`setPrevButtonImageResource(int resId)` \u003cbr\u003e Sets image resource of the *previous* control button|\n| void |`setNextButtonImageResource(int resId)` \u003cbr\u003eChanges image resource of the *next* control button|\n| void |`setPlayButtonImageResource(int resId)` \u003cbr\u003eSets image resource of the *play* control button|\n| void |`setPauseButtonImageResource(int resId)` \u003cbr\u003eSets image resource of the *pause* control button|\n| void |`setRepeatButtonImageResource(int repeatResId, int notRepeatResId)` \u003cbr\u003eSets image resource of the *repeat* control button.\u003cbr\u003e *`repeatResId`*: when repetition is enabled \u003cbr\u003e *`notRepeatResId`*: when repetition is disabled|\n| void |`setOnErrorListener(Arg.OnErrorListener onErrorListener)` \u003cbr\u003e `setOnPreparedListener(Arg.OnPreparedListener onPreparedListener)` \u003cbr\u003e `setOnPausedListener(Arg.OnPausedListener onPausedListener)` \u003cbr\u003e `setOnPlayingListener(Arg.OnPlayingListener onPlayingListener)` \u003cbr\u003e`setOnCompletedListener(Arg.OnCompletedListener onCompletedListener)` \u003cbr\u003e`setOnTimeChangeListener(Arg.OnTimeChangeListener onTimeChangeListener)` \u003cbr\u003e`setOnPlaylistAudioChangedListener(Arg.OnPlaylistAudioChangedListener onPlaylistAudioChangedListener)` \u003cbr\u003e Sets listeners to handle broadcasts|\n\n\u003cbr\u003e\n\n#### ArgAudio\n| Return | Method/Description |\n| :-- |:--|\n| ArgAudio |*`static`*`createFromRaw(@RawRes int rawId)` \u003cbr\u003e Short way to create an audio from raw resources. Singer and audio name will be set to *rawId*.|\n| ArgAudio |*`static`*`createFromRaw(String singer, String audioName, @RawRes int rawId)` \u003cbr\u003eCreates a raw type audio.|\n| ArgAudio|*`static`*`createFromAssets(String assetName)` \u003cbr\u003eShort way to create an audio from raw resources. Singer and audio name will be set to *assetName*.|\n| ArgAudio|*`static`*`createFromAssets(String singer, String audioName, String assetName)` \u003cbr\u003eCreates an assets type audio.|\n| ArgAudio|*`static`*`createFromURL(String url)` \u003cbr\u003eShort way to create an audio from raw resources. Singer and audio name will be set to *url*.|\n| ArgAudio|*`static`*`createFromURL(String singer, String audioName,  String url)` \u003cbr\u003eCreates an url type audio.|\n| ArgAudio|*`static`*`createFromFilePath(String filePath)` \u003cbr\u003eCreates a filepath type audio.|\n| ArgAudio|*`static`*`createFromFilePath(String singer, String audioName, String filePath)` \u003cbr\u003eShort way to create an audio from raw resources. Singer and audio name will be set to *filePath*.|\n| ArgAudio|`cloneAudio()` \u003cbr\u003eClones the audio.|\n| ArgAudio|`convertToPlaylist()` \u003cbr\u003e Makes audio as a playlist audio.|\n| boolean|`isPlaylist()` \u003cbr\u003e Checks if the audio is a playlist audio.|\n\n\u003cbr\u003e\n\n#### ArgAudioList\n| Return | Method/Description |\n| :-- |:--|\n| ArgAudioList|`add(@NonNull ArgAudio audio)` \u003cbr\u003eAdd an ArgAudio|\n| ArgAudio |`getCurrentAudio()` \u003cbr\u003e Gets current(playing) audio.|\n| int|`getCurrentIndex()` \u003cbr\u003eGets index of current audio.|\n| boolean|`equals(Object obj)` \u003cbr\u003e Checks if another ArgAudioList object is equal to the current one. Checks emptyness, equalness of first and last childs of objects and sizes. |\n| void |`goTo(int index)` \u003cbr\u003e Changes playing audio of playlist.|\n| boolean|`hasNext()` \u003cbr\u003eChecks if any next audio|\n| int|`getNextIndex()` \u003cbr\u003e Gets index of next audio.|\n| boolean|`goToNext()` \u003cbr\u003e Sets next audio as playing audio. If this action is not possible, method returns false.|\n| boolean|`hasPrev()` \u003cbr\u003eChecks if any previous audio|\n| int|`getPrevIndex()` \u003cbr\u003e Gets index of previous audio.|\n| boolean|`goToPrev()` \u003cbr\u003e Sets previous audio as playing audio. If this action is not possible, method returns false.|\n\n\u003cbr\u003e\n\n#### ArgNotificationOptions\n| Return | Method/Description |\n| :-- |:--|\n| OnBuildNotificationListener |`getListener()` \u003cbr\u003e Gets the listener.|\n| ArgNotificationOptions |`setListener()` \u003cbr\u003e Sets the listener.|\n| bool|`isProgressEnabled()` \u003cbr\u003eChecks whether progress is enabled. |\n| ArgNotificationOptions|`setProgressEnabled(boolean progressEnabled)` \u003cbr\u003eChecks whether progress is enabled. (Current time and a progress view is visible if set to true)|\n| int |`getNotificationId()` \u003cbr\u003e Gets notification id. |\n| ArgNotificationOptions |`setNotificationId(int notificationId)` \u003cbr\u003e Sets notification id.|\n| String |`getChannelId()` \u003cbr\u003e Gets channel id. \u003cbr\u003eRequires MinSDK of 26 (O)|\n| ArgNotificationOptions |`setChannelId(CharSequence channelId)` \u003cbr\u003e Sets channel id. \u003cbr\u003eRequires MinSDK of 26 (O)|\n| String |`getChannelName()` \u003cbr\u003e Gets channel name. \u003cbr\u003eRequires MinSDK of 26 (O)|\n| ArgNotificationOptions |`setChannelName(CharSequence channelName)` \u003cbr\u003e Sets channel name. \u003cbr\u003eRequires MinSDK of 26 (O)|\n\n\u003cbr\u003e\n\n\n## ScreenShots\n### Progress View\n![](https://raw.githubusercontent.com/mergehez/ArgPlayer/master/ScreenShots/progressx.png \"\")\n---\n### Error View\n![](https://raw.githubusercontent.com/mergehez/ArgPlayer/master/ScreenShots/errorviewx.png \"\")\n---\n### Notification\n![](https://raw.githubusercontent.com/mergehez/ArgPlayer/master/ScreenShots/notification-with-progress.png \"\")\n![](https://raw.githubusercontent.com/mergehez/ArgPlayer/master/ScreenShots/notification-without-progress.png \"\")\n---\n### Small Player View\n![](https://raw.githubusercontent.com/mergehez/ArgPlayer/master/ScreenShots/smallview.png \"\")\n\n### Large Player View\n![](https://raw.githubusercontent.com/mergehez/ArgPlayer/master/ScreenShots/largeview.png \"\")\n---\n### Fullscreen Player View\n![](https://raw.githubusercontent.com/mergehez/ArgPlayer/master/ScreenShots/fullscreenview.png \"\")\n![](https://raw.githubusercontent.com/mergehez/ArgPlayer/master/ScreenShots/fullscreenview-playlist.png \"\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmergehez%2Fargplayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmergehez%2Fargplayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmergehez%2Fargplayer/lists"}