예제 #1
0
 /**
  * Initialize library
  *
  * @param context
  * @param configuration
  */
 public static void initialize(Context context, @NonNull TGConfiguration configuration) {
   // library should be initialized only once
   if (mInstance != null && mInstance.mContext != null) {
     return;
   }
   mInstance = new Tapglue(context, configuration);
   mInstance.mUserManager = new TGUserManager(mInstance);
   mInstance.mConnectionManager = new TGConnectionManager(mInstance);
   mInstance.mEventManager = new TGEventManager(mInstance);
   mInstance.mFeedManager = new TGFeedManager(mInstance);
   mInstance.getUserManager().tryToLoadUserFromCache();
 }
예제 #2
0
 /**
  * Get feed manager
  *
  * @return Feed manager
  */
 public static TGFeedManagerInterface feed() {
   return mInstance.getFeedManager();
 }
예제 #3
0
 /**
  * Get events manager
  *
  * @return Events manager
  */
 public static TGEventManagerInterface event() {
   return mInstance.getEventManager();
 }
예제 #4
0
 /**
  * Get connections manager
  *
  * @return Connections manager
  */
 public static TGConnectionManagerInterface connections() {
   return mInstance.getConnectionManager();
 }
예제 #5
0
 /**
  * Get user manager
  *
  * @return User manager
  */
 public static TGUserManagerInterface user() {
   return mInstance.getUserManager();
 }