jkovacs / lastfm-java

Java bindings for the Last.fm Web Services
BSD 2-Clause "Simplified" License
74 stars 34 forks source link

Check whether a session is valid #15

Open JoshuaD84 opened 6 years ago

JoshuaD84 commented 6 years ago

After calling

    session = Authenticator.getMobileSession( username, password, key, secret );

Is there a way to check whether that session is valid, and if not, why it failed (i.e. bad username / password, no internet connection, etc.)

Thank you!

mvmn commented 3 years ago

Experimentally found out that it returns null if you use invalid credentials For connection errors it will probably throw exceptions - got to try with disconnected WiFi