Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add APIs 'setFlushBatchSize' and 'setMaximumDatabaseLimit' #795

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

zihejia
Copy link
Contributor

@zihejia zihejia commented Jul 22, 2022

This PR adds the following new configs for you to optimize the Mixpanel tracking:

     * Set maximum number of events/updates to send in a single network request
     *
     * @param flushBatchSize  int, the number of events to be flushed at a time, defaults to 50
     */
    public void setFlushBatchSize(int flushBatchSize);

    /**
     * Set an integer number of bytes, the maximum size limit to the Mixpanel database.
     *
     * @param maximumDatabaseLimit an integer number of bytes, the maximum size limit to the Mixpanel database.
     */
    public void setMaximumDatabaseLimit(int maximumDatabaseLimit);

You can also set them in AndroidManifest.xml, i.e.

        <meta-data android:name="com.mixpanel.android.MPConfig.FlushBatchSize"
            android:value="5" />

        <meta-data android:name="com.mixpanel.android.MPConfig.MaximumDatabaseLimit"
            android:value="100000000" />

@zihejia zihejia force-pushed the add-db-config branch 2 times, most recently from e9df68c to 255a5ff Compare July 22, 2022 22:29
Copy link
Collaborator

@jaredmixpanel jaredmixpanel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zihejia zihejia merged commit 51e7200 into master Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants