@Override public boolean accountTypeEnabled(AccountDetails.Type type) { switch (type) { case Facebook: return ChatSDK.config().facebookLoginEnabled(); case Twitter: return ChatSDK.config().twitterLoginEnabled(); case Google: return ChatSDK.config().googleLoginEnabled(); default: return false; } }
public Builder defaultNamePrefix(String value) { config.defaultNamePrefix = value; config.updateDefaultName(); return this; }
public static String getMapImageURL (LatLng location, int width, int height) { String googleMapsAPIKey = ChatSDK.config().googleMapsApiKey; String api = "https://maps.googleapis.com/maps/api/staticmap"; String markers = "markers="+location.latitude+","+location.longitude; String size = "zoom=18&size="+width+"x"+ height; String key = "key=" + googleMapsAPIKey; return api + "?" + markers + "&" + size + "&" + key; }
protected User getUser() { return user != null ? user : ChatSDK.currentUser(); }
public static Configuration config () { return shared().config; }
/** * Shortcut to return the interface adapter * @return InterfaceAdapter */ public static InterfaceAdapter ui () { return InterfaceManager.shared().a; }
public static CoreHandler core () { return a().core; }
public static ContactHandler contact () { return a().contact; }
/** * In this case the resource will be set to the device's IMEI number * * @param domain * @param hostAddress * @param port * @return */ public Builder xmpp(String domain, String hostAddress, int port) { return xmpp(domain, hostAddress, port, null); }
@Override public boolean allowThreadCreation () { return ChatSDK.config().publicRoomCreationEnabled; }
public static ContactHandler contact () { return a().contact; }
public static ReadReceiptHandler readReceipts () { return a().readReceipts; }
public static LastOnlineHandler lastOnline () { return a().lastOnline; }
public static LocationMessageHandler locationMessage () { return a().locationMessage; }
public static StickerMessageDisplayHandler stickerMessage () { return a().stickerMessage; }
public static LocationMessageHandler locationMessage () { return a().locationMessage; }
public static PublicThreadHandler publicThread () { return a().publicThread; }
public static SearchHandler search () { return a().search; }
public static HookHandler hook () { return a().hook; }
public static FileMessageDisplayHandler fileMessage () { return a().fileMessage; }