aboutsummaryrefslogtreecommitdiffhomepage
path: root/example/android/AndroidExample/app/src/main/java/com/libmailcore/androidexample/MessagesSyncManager.java
blob: 3c25e2bfbaf490d5bd5c4b7692841458ba9b98b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.libmailcore.androidexample;

import com.libmailcore.ConnectionType;
import com.libmailcore.IMAPFetchMessagesOperation;
import com.libmailcore.IMAPSession;
import com.libmailcore.IMAPMessage;

/**
 * Created by hoa on 1/8/15.
 */
public class MessagesSyncManager {
    public IMAPSession session;
    public IMAPMessage currentMessage;

    static private MessagesSyncManager theSingleton;

    public static MessagesSyncManager singleton() {
        if (theSingleton == null) {
            theSingleton = new MessagesSyncManager();
        }
        return theSingleton;
    }

    private MessagesSyncManager() {
        session = new IMAPSession();
        session.setUsername("login@gmail.com");
        session.setPassword("password");
        session.setHostname("imap.gmail.com");
        session.setPort(993);
        session.setConnectionType(ConnectionType.ConnectionTypeTLS);
    }


}