Skip to content

Commit

Permalink
Merge pull request #355 from Iterable/MOB-2971-Provisioning-context-t…
Browse files Browse the repository at this point in the history
…o-ActivityMonitor

[MOB-2971] - Set Context method
  • Loading branch information
Ayyanchira authored Jun 17, 2021
2 parents 37f1eff + 04755b5 commit 86b777c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ public static void initialize(@NonNull Context context, @NonNull String apiKey,
IterablePushActionReceiver.processPendingAction(context);
}

public static void setContext(Context context) {
IterableActivityMonitor.getInstance().registerLifecycleCallbacks(context);
}

static void loadLastSavedConfiguration(Context context) {
SharedPreferences sharedPref = context.getSharedPreferences(IterableConstants.SHARED_PREFS_SAVED_CONFIGURATION, Context.MODE_PRIVATE);
boolean offlineMode = sharedPref.getBoolean(IterableConstants.SHARED_PREFS_OFFLINE_MODE_BETA_KEY, false);
Expand Down

0 comments on commit 86b777c

Please sign in to comment.