コード例 #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Passcode manager
    passcodeManager = ForceApp.APP.getPasscodeManager();
    tokenRevocationReceiver = new TokenRevocationReceiver(this);

    // Let observers know
    EventsObservable.get().notifyEvent(EventType.MainActivityCreateComplete, this);
  }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    Log.i(TAG, "onCreate called");
    super.onCreate(savedInstanceState);

    // Get clientManager
    clientManager = buildClientManager();

    // Gets an instance of the passcode manager.
    passcodeManager = SalesforceSDKManager.getInstance().getPasscodeManager();

    // TODO
    // Have a user switcher once we have an account manager bridge for react native

    // Let observers know
    EventsObservable.get().notifyEvent(EventType.MainActivityCreateComplete, this);
  }
コード例 #3
0
  @Override
  public void onCreate() {
    super.onCreate();

    // Initialize encryption module
    Encryptor.init(this);

    // Initialize the http client
    String extendedUserAgent = getUserAgent() + " Native";
    HttpAccess.init(this, extendedUserAgent);

    // Ensure we have a CookieSyncManager
    CookieSyncManager.createInstance(this);

    // Done
    APP = this;
    EventsObservable.get().notifyEvent(EventType.AppCreateComplete);
  }