Developers
To troubleshoot issues with the mParticle Android SDK, first rule out basic configuration issues:
If your app hasn’t crashed, but you aren’t seeing data being forwarded to an output properly, double-check the following areas:
If none of these steps helps you correct the issue, then you may need to debug your app with breakpoints.
Confirm that the kit is initialized before the necessary event is triggered. If specific kit methods are manually called, errors will show in the Logcat console if the kit is not initialized. If using the standard flow, confirm the kit is initialized if you are not seeing a specific event flowing downstream.
logLevel = MParticle.LogLevel.VERBOSE
If you are troubleshooting for issues other than initialization and basic data flow, set up breakpoints to isolate code execution step-by-step.
Before setting breakpoints, however, it is helpful to review the kit code to identify where you might need to place breakpoints. For example, if you are diagnosing custom events issues, you don’t need to put breakpoints in functions that call commerce events.
To set breakpoints:
If you want to use proxy tools such as Charles Proxy, you may need to turn off mParticle SSL pinning in your development build.
Example SDK initialization code (step 1.3) where you would disable pinning:
// Required to disable SSL pinning
val networkOptions = NetworkOptions.builder()
.setPinningDisabledInDevelopment(true)
.build()
val options = MParticleOptions.builder(this)
.credentials("API-KEY","API-SECRET")
.environment(MParticle.Environment.Development)
.networkOptions(networkOptions) // Required to disable SSL pinning
.build()
MParticle.start(options)
// Required to disable SSL pinning
NetworkOptions networkOptions = NetworkOptions.builder()
.setPinningDisabledInDevelopment(true)
.build();
MParticleOptions options = MParticleOptions.builder(this)
.credentials("API-KEY","API-SECRET")
.environment(MParticle.Environment.Development)
.networkOptions(networkOptions) // Required to disable SSL pinning
.build();
MParticle.start(options);
If you want more help with troubleshooting, see Android Developer: Debug your App.
Was this page helpful?