mixpanel/mixpanel-android

How do you set com.mixpanel.android.MPConfig.EventsEndpoint at runtime

Closed this issue · 4 comments

dl748 commented

mixpanel-swift has a function called setServerURL but the android sdk does not provide such a method, is there a way to dynamically set this at runtime?

hi @dl748 , yes, please refer to this doc https://developer.mixpanel.com/docs/self-hosted-tracking in the Android SDK section.

dl748 commented

No, those instructions set the variable at COMPILE time, which is completely different.

my "PROXY_DOMAIN" is variable and can dynamically change AFTER the build process.

MIXPANEL-SWIFT allows me to set that via setServerURL, the WEB allows me to set that via the init parameters, but the MIXPANEL-ANDROID seems to provide no such documented feature.

You cannot set the AndroidManifest.xml at runtime.

hi @dl748 , sorry about that. We will consider providing it in the next couple of versions.

hi @dl748 , we just released 5.9.0, now you can use setServerURL to set it in the run time. I'm closing it now, please feel free to reopen it if you find any issues in this API.