use of com.softartdev.lastfm.Caller in project scroball by peterjosling.
the class ScroballApplication method onCreate.
@Override
public void onCreate() {
super.onCreate();
Fabric.with(this, new Crashlytics());
FlowManager.init(this);
MobileAds.initialize(this, "ca-app-pub-9985743520520066~4279780475");
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
String userAgent = String.format(Locale.UK, "%s.%d", BuildConfig.APPLICATION_ID, BuildConfig.VERSION_CODE);
String sessionKeyKey = getString(R.string.saved_session_key);
LastfmApi api = new LastfmApi();
Caller caller = Caller.getInstance();
if (sharedPreferences.contains(sessionKeyKey)) {
String sessionKey = sharedPreferences.getString(sessionKeyKey, null);
lastfmClient = new LastfmClient(api, caller, userAgent, sessionKey);
} else {
lastfmClient = new LastfmClient(api, caller, userAgent);
}
scroballDB = new ScroballDB();
eventBus.register(this);
}
Aggregations