Skip to content

Commit

Permalink
初始化项目,有一个问题 未解决 无法运行
Browse files Browse the repository at this point in the history
  • Loading branch information
huihui4045 committed Feb 18, 2017
1 parent e9e1406 commit fdc6a67
Show file tree
Hide file tree
Showing 333 changed files with 26,917 additions and 44 deletions.
48 changes: 47 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,56 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.android.support:palette-v7:25.1.1'
//rxjava
compile 'io.reactivex:rxjava:1.2.6'
compile 'io.reactivex:rxandroid:1.2.1'
//glide
compile 'com.github.bumptech.glide:glide:3.7.0'
//butterknife
compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.jakewharton:butterknife-compiler:8.5.1'
//retrofit
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.6.0'
//materialicon
compile 'net.steamcrafted:materialiconlib:1.1.1'
//leakcanary
// debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
// releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
// testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
//stetho
// compile 'com.facebook.stetho:stetho:1.4.1'
// compile 'com.facebook.stetho:stetho-okhttp3:1.4.1'
//dagger2
compile 'com.google.dagger:dagger:2.9'
compile 'com.google.dagger:dagger-compiler:2.9'
provided 'org.glassfish:javax.annotation:10.0-b28'
//materialdialogs
compile 'com.afollestad.material-dialogs:core:0.9.1.0'
//imageloader
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
//slidinguppanel
compile 'com.sothree.slidinguppanel:library:3.3.1'

compile('com.github.naman14:app-theme-engine:0.5.2@aar') {
transitive = true
}

/*compile('com.github.afollestad:app-theme-engine:0.2.1') {
transitive = true
}*/


}
74 changes: 69 additions & 5 deletions app/src/main/AndroidManifest.xml
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 app/src/main/aidl/io/hefuyi/listener/IListenerService.aidl
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);
}
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 app/src/main/java/com/huihui/musicplayer/MainActivity.java

This file was deleted.

47 changes: 47 additions & 0 deletions app/src/main/java/io/hefuyi/listener/Constants.java
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";
}
Loading

0 comments on commit fdc6a67

Please sign in to comment.