-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9e1406
commit fdc6a67
Showing
333 changed files
with
26,917 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,84 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.huihui.musicplayer"> | ||
package="io.hefuyi.listener"> | ||
|
||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> | ||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
<uses-permission android:name="android.permission.WAKE_LOCK"/> | ||
<uses-permission android:name="android.permission.BROADCAST_STICKY"/> | ||
|
||
<application | ||
android:name=".ListenerApp" | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
<activity android:name=".MainActivity"> | ||
android:launchMode="singleTask" | ||
android:theme="@style/AppThemeLight"> | ||
<activity | ||
android:name=".ui.activity.MainActivity" | ||
android:label="@string/app_name" | ||
android:screenOrientation="portrait"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
|
||
<category android:name="android.intent.category.CATEGORY_APP_MUSIC"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
<intent-filter> | ||
<action android:name="android.intent.action.VIEW"/> | ||
|
||
<category android:name="android.intent.category.DEFAULT"/> | ||
|
||
<data android:scheme="file"/> | ||
<data android:mimeType="audio/*"/> | ||
<data android:mimeType="application/ogg"/> | ||
<data android:mimeType="application/x-ogg"/> | ||
<data android:mimeType="application/itunes"/> | ||
</intent-filter> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<action android:name="android.intent.action.VIEW"/> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
<category android:name="android.intent.category.DEFAULT"/> | ||
<category android:name="android.intent.category.BROWSABLE"/> | ||
|
||
<data android:scheme="http"/> | ||
<data android:mimeType="audio/*"/> | ||
<data android:mimeType="application/ogg"/> | ||
<data android:mimeType="application/x-ogg"/> | ||
<data android:mimeType="application/itunes"/> | ||
</intent-filter> | ||
<intent-filter android:priority="-1"> | ||
<action android:name="android.intent.action.VIEW"/> | ||
|
||
<category android:name="android.intent.category.DEFAULT"/> | ||
<category android:name="android.intent.category.BROWSABLE"/> | ||
|
||
<data android:scheme="content"/> | ||
<data android:mimeType="audio/*"/> | ||
<data android:mimeType="application/ogg"/> | ||
<data android:mimeType="application/x-ogg"/> | ||
<data android:mimeType="application/itunes"/> | ||
</intent-filter> | ||
</activity> | ||
|
||
<activity android:name=".ui.activity.SettingActivity"> | ||
</activity> | ||
|
||
<service | ||
android:name=".MusicService" | ||
android:label="@string/app_name" | ||
android:process=":main"/> | ||
|
||
<receiver android:name=".receiver.MediaButtonIntentReceiver"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MEDIA_BUTTON"/> | ||
<action android:name="android.media.AUDIO_BECOMING_NOISY"/> | ||
</intent-filter> | ||
</receiver> | ||
|
||
</application> | ||
|
||
</manifest> |
52 changes: 52 additions & 0 deletions
52
app/src/main/aidl/io/hefuyi/listener/IListenerService.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package io.hefuyi.listener; | ||
|
||
import io.hefuyi.listener.mvp.model.MusicPlaybackTrack; | ||
|
||
interface IListenerService { | ||
|
||
void openFile(String path); | ||
void open(in long [] list, int position, long sourceId, int sourceType); | ||
void stop(); | ||
void pause(); | ||
void play(); | ||
void prev(boolean forcePrevious); | ||
void next(); | ||
void enqueue(in long [] list, int action, long sourceId, int sourceType); | ||
void setQueuePosition(int index); | ||
void setShuffleMode(int shufflemode); | ||
void setRepeatMode(int repeatmode); | ||
void moveQueueItem(int from, int to); | ||
void refresh(); | ||
void playlistChanged(); | ||
boolean isPlaying(); | ||
long [] getQueue(); | ||
long getQueueItemAtPosition(int position); | ||
int getQueueSize(); | ||
int getQueuePosition(); | ||
int getQueueHistoryPosition(int position); | ||
int getQueueHistorySize(); | ||
int[] getQueueHistoryList(); | ||
long duration(); | ||
long position(); | ||
long seek(long pos); | ||
void seekRelative(long deltaInMs); | ||
long getAudioId(); | ||
MusicPlaybackTrack getCurrentTrack(); | ||
MusicPlaybackTrack getTrack(int index); | ||
long getNextAudioId(); | ||
long getPreviousAudioId(); | ||
long getArtistId(); | ||
long getAlbumId(); | ||
String getArtistName(); | ||
String getTrackName(); | ||
String getAlbumName(); | ||
String getPath(); | ||
int getShuffleMode(); | ||
int removeTracks(int first, int last); | ||
int removeTrack(long id); | ||
boolean removeTrackAtPosition(long id, int position); | ||
int getRepeatMode(); | ||
int getMediaMountedCount(); | ||
int getAudioSessionId(); | ||
void setLockscreenAlbumArt(boolean enabled); | ||
} |
5 changes: 5 additions & 0 deletions
5
app/src/main/aidl/io/hefuyi/listener/mvp/model/MusicPlaybackTrack.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package io.hefuyi.listener.mvp.model; | ||
|
||
parcelable MusicPlaybackTrack; | ||
|
||
|
13 changes: 0 additions & 13 deletions
13
app/src/main/java/com/huihui/musicplayer/MainActivity.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package io.hefuyi.listener; | ||
|
||
/** | ||
* Created by hefuyi on 2016/11/3. | ||
*/ | ||
|
||
public class Constants { | ||
|
||
public static final String NAVIGATE_LIBRARY = "navigate_library"; | ||
public static final String NAVIGATE_PLAYLIST = "navigate_playlist"; | ||
public static final String NAVIGATE_QUEUE = "navigate_queue"; | ||
public static final String NAVIGATE_ALBUM = "navigate_album"; | ||
public static final String NAVIGATE_ARTIST = "navigate_artist"; | ||
public static final String NAVIGATE_PLAYRANKING = "navigate_playranking"; | ||
|
||
public static final String NAVIGATE_PLAYLIST_RECENTPLAY = "navigate_playlist_recentplay"; | ||
public static final String NAVIGATE_PLAYLIST_RECENTADD = "navigate_playlist_recentadd"; | ||
public static final String NAVIGATE_PLAYLIST_TOPPLAYED = "navigate_playlist_topplayed"; | ||
public static final String NAVIGATE_ALLSONG = "navigate_all_song"; | ||
public static final String NAVIGATE_PLAYLIST_FAVOURATE = "navigate_playlist_favourate"; | ||
public static final String PLAYLIST_FOREGROUND_COLOR = "foreground_color"; | ||
|
||
public static final String ALBUM_ID = "album_id"; | ||
public static final String ALBUM_NAME = "album_name"; | ||
public static final String ARTIST_ID = "artist_id"; | ||
public static final String ARTIST_NAME = "artist_name"; | ||
public static final String PLAYLIST_ID = "playlist_id"; | ||
public static final String PLAYLIST_NAME = "playlist_name"; | ||
public static final String PLAYLIST_TYPE = "playlist_type"; | ||
public static final String FIRST_ALBUM_ID = "first_album_id"; | ||
public static final String FOLDER_PATH = "folder_path"; | ||
|
||
public static final String NAVIGATE_SETTINGS = "navigate_settings"; | ||
public static final String NAVIGATE_SEARCH = "navigate_search"; | ||
|
||
public static final int PLAYLIST_VIEW_LIST = 1; | ||
public static final int PLAYLIST_VIEW_GRID = 2; | ||
|
||
public static final int HTTP_CACHE_SIZE = 20 * 1024 * 1024; | ||
public static final int HTTP_CONNECT_TIMEOUT = 15 * 1000; | ||
public static final int HTTP_READ_TIMEOUT = 20 * 1000; | ||
|
||
public static final String BASE_API_URL_LASTFM = "http://ws.audioscrobbler.com/2.0/"; | ||
public static final String BASE_API_URL_KUGOU = "http://lyrics.kugou.com/"; | ||
|
||
public static final String TRANSITION_NAME = "transition_name"; | ||
} |
Oops, something went wrong.