title: How to call Activity method from Presenter in Clean architecture?
body: <p>I am developing an app where I am using clean architecture. In presenter, when something comes to method onCompleted then I must call function from Main activity.
  this is my Presenter:</p>
  
  <pre><code>public class CheckInPresenter implements Presenter {
  
      UseCase postCheckInUseCase;
      Context context;
  
      @Inject
      CheckInPresenter(@Named("putCheckIn") UseCase postCheckInUseCase){
          this.postCheckInUseCase = postCheckInUseCase;
      }
  
      public void initialize(){this.initializeCheckIn();}
      public void initializeCheckIn(){this.putCheckIn();}
      public void putCheckIn(){
          this.postCheckInUseCase.execute(new CheckInSubscriber());
  
      }
  
      @Override
      public void resume() {
  
      }
  
      @Override
      public void pause() {
  
      }
  
      @Override
      public void destroy() {
  
      }
      private final class CheckInSubscriber extends DefaultSubscriber&lt;EventEntity&gt;{
          @Override
          public void onCompleted() {
  
              Log.d("onCompleted", "OnCompleted");
          }
  
          @Override
          public void onError(Throwable e) {
              Log.d("onError", "OnError: " + e.getMessage());
          }
  
          @Override
          public void onNext(EventEntity eventEntity) {
  
              Log.d("onNext", "OnNext");
          }
      }
  }
  </code></pre>
  
  <p>And this is my function from MainActivity that I have to call:</p>
  
  <pre><code>public void getDataForToolbar() {
          SharedPreferences sharedPreferences = getSharedPreferences(getResources().getString(R.string.Account_json), Context.MODE_PRIVATE);
          final String account = sharedPreferences.getString(getResources().getString(R.string.account_json), null);
  
          if (account != null) {
              Gson gson = new Gson();
              mAccount = gson.fromJson(account, AccountModel.class);
  
              for (CompanyModel com : mAccount.getCompanies()) {
                  String name = com.getName();
                  company_name.setText(name);
                  logo_url = com.getLogo_url();
              }
              if (logo_url == null || logo_url.isEmpty()) {
                  Picasso
                          .with(this)
                          .load(R.drawable.default_company)
                          .resize(70, 58)
                          .transform(new RoundedTransformation(8, 0))
                          .into(toolbarImage);
              } else {
                  picassoLoader(this, toolbarImage, logo_url);
              }
              String username = mAccount.getUsername();
              if(mAccount.getStatus()){
                  aUsername.setText(username + "/" + getResources().getString(R.string.on_duty));
                  aUsername.setBackgroundColor(ContextCompat.getColor(mContext, R.color.colorGreen));
              }else{
                  aUsername.setText(username + "/" + getResources().getString(R.string.off_duty));
                  aUsername.setBackgroundColor(ContextCompat.getColor(mContext, R.color.colorWhite));
              }
  
          }
      }
  </code></pre>
  
  <p>Could someone helps me how to call this function into my onCompleted method in Presenter? Thanks in advance.</p>