#### 2022-12-15 V7.0.6

- *.[新增]新增支持歌手头像从歌曲文件中获取。
This commit is contained in:
紫林软件 2022-12-15 22:28:53 +08:00
parent 3d55b0914c
commit 230bcba860
7 changed files with 37 additions and 16 deletions

View File

@ -5,15 +5,15 @@
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
<option name="testRunner" value="GRADLE" /> <option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" /> <option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="JDK" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" /> <option value="$PROJECT_DIR$/app" />
</set> </set>
</option> </option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings> </GradleProjectSettings>
</option> </option>
</component> </component>

View File

@ -46,5 +46,10 @@
<option name="name" value="maven" /> <option name="name" value="maven" />
<option name="url" value="http://maven.aliyun.com/nexus/content/repositories/jcenter" /> <option name="url" value="http://maven.aliyun.com/nexus/content/repositories/jcenter" />
</remote-repository> </remote-repository>
<remote-repository>
<option name="id" value="MavenLocal" />
<option name="name" value="MavenLocal" />
<option name="url" value="file:/$USER_HOME$/.m2/repository/" />
</remote-repository>
</component> </component>
</project> </project>

View File

@ -4,6 +4,9 @@
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/HappyPlayer5-happy_player6.iml" filepath="$PROJECT_DIR$/HappyPlayer5-happy_player6.iml" /> <module fileurl="file://$PROJECT_DIR$/HappyPlayer5-happy_player6.iml" filepath="$PROJECT_DIR$/HappyPlayer5-happy_player6.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.iml" /> <module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.main.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.unitTest.iml" />
</modules> </modules>
</component> </component>
</project> </project>

View File

@ -1,3 +1,7 @@
#### 2022-12-15 V7.0.6
- *.[新增]新增支持歌手头像从歌曲文件中获取。
#### 2022-02-13 V7.0.5 #### 2022-02-13 V7.0.5
- *.[改进]启动软件时自动播放歌曲。 - *.[改进]启动软件时自动播放歌曲。

View File

@ -8,8 +8,8 @@ android {
applicationId "com.zlm.hp" applicationId "com.zlm.hp"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 29 targetSdkVersion 29
versionCode 11 versionCode 12
versionName "V7.0.5" versionName "V7.0.6"
/**添加多 dex分包支持*/ /**添加多 dex分包支持*/
multiDexEnabled true multiDexEnabled true
useLibrary 'org.apache.http.legacy' useLibrary 'org.apache.http.legacy'

View File

@ -6,6 +6,7 @@ import android.graphics.Bitmap;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.BitmapDrawable;
import android.media.MediaMetadataRetriever;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Message; import android.os.Message;
@ -439,17 +440,25 @@ public class MainActivity extends BaseActivity {
mMusicSeekBar.setMax((int) initAudioInfo.getDuration()); mMusicSeekBar.setMax((int) initAudioInfo.getDuration());
mMusicSeekBar.setProgress((int) initAudioInfo.getPlayProgress()); mMusicSeekBar.setProgress((int) initAudioInfo.getPlayProgress());
mMusicSeekBar.setSecondaryProgress(0); mMusicSeekBar.setSecondaryProgress(0);
MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever();
//加载歌手头像 mediaMetadataRetriever.setDataSource(initAudioInfo.getFilePath());
ImageUtil.loadSingerImage(mContext, mArtistImageView, initAudioInfo.getSingerName(), mConfigInfo.isWifi(), 400, 400, new AsyncHandlerTask(mUIHandler, mWorkerHandler), new ImageUtil.ImageLoadCallBack() { byte[] cover = mediaMetadataRetriever.getEmbeddedPicture();
@Override if(cover!=null) {
public void callback(Bitmap bitmap) { Bitmap singer_bitmap = BitmapFactory.decodeByteArray(cover, 0, cover.length);
//if (bitmap != null) { mArtistImageView.setImageDrawable(new BitmapDrawable(singer_bitmap));
AudioBroadcastReceiver.sendNotifiyImgLoadedReceiver(mContext, initAudioInfo); mArtistImageView.setTag(initAudioInfo.getFilePath().hashCode()+"");
// } }
} else {
}); //加载歌手头像
ImageUtil.loadSingerImage(mContext, mArtistImageView, initAudioInfo.getSingerName(), mConfigInfo.isWifi(), 400, 400, new AsyncHandlerTask(mUIHandler, mWorkerHandler), new ImageUtil.ImageLoadCallBack() {
@Override
public void callback(Bitmap bitmap) {
//if (bitmap != null) {
AudioBroadcastReceiver.sendNotifiyImgLoadedReceiver(mContext, initAudioInfo);
// }
}
});
}
//加载歌词 //加载歌词
String keyWords = initAudioInfo.getTitle(); String keyWords = initAudioInfo.getTitle();
LyricsManager.newInstance(mContext).loadLyrics(initAudioInfo.getFilePath(),keyWords, keyWords, initAudioInfo.getDuration() + "", initAudioInfo.getHash(), mConfigInfo.isWifi(), new AsyncHandlerTask(mUIHandler, mWorkerHandler), null); LyricsManager.newInstance(mContext).loadLyrics(initAudioInfo.getFilePath(),keyWords, keyWords, initAudioInfo.getDuration() + "", initAudioInfo.getHash(), mConfigInfo.isWifi(), new AsyncHandlerTask(mUIHandler, mWorkerHandler), null);

View File

@ -1,6 +1,6 @@
#Sat Sep 26 12:04:29 CST 2020 #Sat Sep 26 12:04:29 CST 2020
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionUrl=file:///E:/\u6211\u7684\u4EE3\u7801/android/gradle\u5305/gradle-6.6.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME