kinyerakenneth / lastfm-java

Automatically exported from code.google.com/p/lastfm-java
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Can I able to use API is used for android? #58

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
If so any sample code is available?

Original issue reported on code.google.com by ASba...@gmail.com on 28 Mar 2014 at 3:01

GoogleCodeExporter commented 9 years ago
yeah, everything is written in the wiki

in onCreate
Caller.getInstance().setCache(null);
Caller.getInstance().setUserAgent("tst");

and this // but crash on 4 android, read why in google
// you can use thread

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

and this update "now playing" // but too crash
ScrobbleResult result = Track.updateNowPlaying("Pixies", "Allison", session);
textview.setText("ok: " + (result.isSuccessful() && !result.isIgnored()));
you can do so only
"Track.updateNowPlaying("Pixies", "Allison", session);"

and scrobble track: //too crash
int now = (int) (System.currentTimeMillis() / 1000);
ScrobbleResult result = Track.scrobble("Pixies", "Allison", now, session);
textview.setText("ok: " + (result.isSuccessful() && !result.isIgnored()));

Original comment by vampire5...@gmail.com on 10 Aug 2014 at 3:40