Marketo / android-sdk

The Marketo Mobile SDK allows integration with Marketo Mobile Engagement.
Other
7 stars 5 forks source link

Use ActivityLifecycleCallbacks instead of imposing onStart/onStop ceremony on all Activities #8

Closed alan-rodriguez closed 6 years ago

alan-rodriguez commented 6 years ago

It doesn't seem that there is any real need to impose the requirement that all consumers of this SDK perform the following ceremony on every Activity in their Application:

  1. Configure activities. Add Marketo.onStart, Marketo.onStop in all or in base activity as shown below.

This burden can removed from SDK consumers if the Marketo SDK uses Application.ActivityLifecycleCallbacks to do whatever work is necessary in onStart and onStop.

jrudydev commented 6 years ago

The SDK currently supports API Level 8 for push notifications. Once we decide to stop supporting the lower APIs we can implement this. It is already implemented for InApp messaging(API Level 14).

pandemanish commented 6 years ago

Marketo SDK is already using ActivityLifecycleCallbacks but the Callback functions were provided if the user specifically wanted to record some additional information