Last active
November 19, 2015 05:00
-
-
Save Alelak/d4c14eaa4868adb6cbde to your computer and use it in GitHub Desktop.
Soundroid code snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Call<List<Track>> call = Soundroid.getSoundcloudService().searchTracksByGenres("House", 20); | |
call.enqueue(new Callback<List<Track>>() { | |
@Override | |
public void onResponse(Response<List<Track>> response, Retrofit retrofit){ | |
if (response.isSuccess()) { | |
tracks.addAll(response.body()); | |
songAdapter.notifyDataSetChanged(); | |
} | |
} | |
@Override | |
public void onFailure(Throwable t) { | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class App extends Application { | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
Soundroid.init(this, client_id); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repositories { | |
maven { url "https://jitpack.io" } | |
} | |
dependencies { | |
// ... other dependencies here | |
compile'com.github.Alelak:Soundroid:1.0@aar' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment