Search in sources :

Example 6 with MPDServerProfile

use of org.gateshipone.malp.mpdservice.profilemanagement.MPDServerProfile in project malp by gateship-one.

the class BackgroundService method connectMPDServer.

/**
 * Gets last used server profile and then tries to connect to it.
 * As SQLite should be safe to call from different processes, this process
 * should be able to see changes to the profile database instantaneously.
 */
private void connectMPDServer() {
    mConnecting = true;
    MPDServerProfile profile = MPDProfileManager.getInstance(this).getAutoconnectProfile();
    ConnectionManager.getInstance(getApplicationContext()).setParameters(profile, this);
    /* Open the actual server connection */
    ConnectionManager.getInstance(getApplicationContext()).reconnectLastServer(this);
}
Also used : MPDServerProfile(org.gateshipone.malp.mpdservice.profilemanagement.MPDServerProfile)

Aggregations

MPDServerProfile (org.gateshipone.malp.mpdservice.profilemanagement.MPDServerProfile)6 Bundle (android.os.Bundle)1 FragmentTransaction (android.support.v4.app.FragmentTransaction)1 Slide (android.transition.Slide)1 EditProfileFragment (org.gateshipone.malp.application.fragments.EditProfileFragment)1 ProfileListItem (org.gateshipone.malp.application.listviewitems.ProfileListItem)1