jrfeng / snow

Android music player framework, compatible with MediaSession. Support custom music player (MediaPlayer, ExoPlayer), custom Notification, custom audio effect engine, only WiFi network, sound quality/dynamic URL, headset clicks, sleep timer, playback history, player state persistence.
MIT License
190 stars 45 forks source link

*Important proguard Issue #56

Closed Naguchennai closed 10 months ago

Naguchennai commented 10 months ago

I thing we have proguard issue .. pls add proguard details what we need to add. my app playing good with out proguard. if i add proguard its not playing

jrfeng commented 10 months ago

OK, I will check it.

Naguchennai commented 10 months ago

i think Callback not work after release... note: its work with later aneroid version not work with old like 21 , 22

i adding this for testing

  buildTypes {
        release {
            debuggable false
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable false
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
Naguchennai commented 10 months ago

its fixed after adding following in proguard.. may be you must add it in you document

 -keep public class * extends snow.player.PlayerService$ComponentFactory { *; }
 -keep class snow.player** { *; }