Search in sources :

Example 16 with Presence

use of org.awesomeapp.messenger.model.Presence in project Zom-Android by zom.

the class LoopbackConnection method loginAsync.

@Override
public void loginAsync(long accountId, String passwordTemp, long providerId, boolean retry) {
    ContentResolver contentResolver = mContext.getContentResolver();
    String userName = Imps.Account.getUserName(contentResolver, accountId);
    mUserPresence = new Presence(Presence.AVAILABLE, "available", null, null, Presence.CLIENT_TYPE_DEFAULT);
    mUser = new Contact(new LoopbackAddress(userName + "!", "loopback", null), userName, Imps.Contacts.TYPE_NORMAL);
    setState(LOGGED_IN, null);
}
Also used : Presence(org.awesomeapp.messenger.model.Presence) ContentResolver(android.content.ContentResolver) Contact(org.awesomeapp.messenger.model.Contact)

Aggregations

Presence (org.awesomeapp.messenger.model.Presence)16 ImException (org.awesomeapp.messenger.model.ImException)7 RemoteException (android.os.RemoteException)6 IOException (java.io.IOException)6 InvocationTargetException (java.lang.reflect.InvocationTargetException)6 KeyManagementException (java.security.KeyManagementException)6 KeyStoreException (java.security.KeyStoreException)6 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)6 CertificateException (java.security.cert.CertificateException)6 RejectedExecutionException (java.util.concurrent.RejectedExecutionException)6 Contact (org.awesomeapp.messenger.model.Contact)6 SmackException (org.jivesoftware.smack.SmackException)6 XMPPException (org.jivesoftware.smack.XMPPException)6 MultiUserChatException (org.jivesoftware.smackx.muc.MultiUserChatException)6 CryptoFailedException (org.jivesoftware.smackx.omemo.exceptions.CryptoFailedException)6 UndecidedOmemoIdentityException (org.jivesoftware.smackx.omemo.exceptions.UndecidedOmemoIdentityException)6 XmppStringprepException (org.jxmpp.stringprep.XmppStringprepException)6 ContentResolver (android.content.ContentResolver)4 ArrayList (java.util.ArrayList)4 ContentValues (android.content.ContentValues)3