Ejemplo n.º 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();
 }