{"componentChunkName":"component---src-templates-markdown-template-jsx","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/android/","result":{"data":{"pageMetadata":{"title":"Android","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/android/","sourceCode":null,"metadataParent":{"title":"SDKs","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/","sourceCode":null,"hasVersionPicker":null,"metadataChildren":[{"title":"SDKs Introduction","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/introduction/","order":6.1,"label":null},{"title":"React Native","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/react-native/","order":6.2,"label":null},{"title":"iOS","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/iOS/","order":6.3,"label":null},{"title":"Android","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/android/","order":6.4,"label":null},{"title":"Java","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/java/","order":6.4,"label":null},{"title":"JavaScript","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/javascript/","order":6.5,"label":null},{"title":"Python","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/python/","order":6.6,"label":null},{"title":"Object API","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/object-api/","order":6.7,"label":null}],"metadataParent":{"title":"Developer Docs","path":"/guides/analytics/analytics-deprecated/developer-docs/","metadataChildren":[{"title":"Introduction","path":"/guides/analytics/analytics-deprecated/developer-docs/introduction/","order":1,"label":null},{"title":"Integrations","path":"/guides/analytics/analytics-deprecated/developer-docs/integrations/","order":4,"label":null},{"title":"Data Warehouses and Data Lakes","path":"/guides/analytics/analytics-deprecated/developer-docs/data-warehouses-lakes/","order":5,"label":null},{"title":"APIs","path":"/guides/analytics/analytics-deprecated/developer-docs/apis/","order":6,"label":null},{"title":"SDKs","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/","order":6,"label":null},{"title":"Developer Basics","path":"/guides/analytics/analytics-deprecated/developer-docs/developer-basics/","order":7,"label":null}],"metadataParent":{"title":"Analytics (Deprecated)","path":"/guides/analytics/analytics-deprecated/","metadataChildren":[{"title":"Introduction","path":"/guides/analytics/analytics-deprecated/introduction/","order":1.1,"label":null},{"title":"Developer Docs","path":"/guides/analytics/analytics-deprecated/developer-docs/","order":4,"label":null},{"title":"Identity Providers","path":"/guides/analytics/analytics-deprecated/identity-providers/","order":null,"label":null},{"title":"Settings","path":"/guides/analytics/analytics-deprecated/settings/","order":null,"label":null}],"metadataParent":{"title":"Analytics","path":"/guides/analytics/","metadataChildren":[{"title":"Introduction","path":"/guides/analytics/introduction/","order":1,"label":null},{"title":"Core Analytics (Beta)","path":"/guides/analytics/core-analytics/","order":1.1,"label":null},{"title":"Analytics Free Trial","path":"/guides/analytics/analytics-free-trial/","order":2,"label":null},{"title":"Setup","path":"/guides/analytics/setup/","order":3,"label":null},{"title":"Settings","path":"/guides/analytics/settings/","order":4,"label":null},{"title":"Analytics Data Manager","path":"/guides/analytics/data-manager/","order":5,"label":null},{"title":"Analyses","path":"/guides/analytics/analyses/","order":6,"label":null},{"title":"Query Builder","path":"/guides/analytics/query-builder/","order":6,"label":null},{"title":"User Aliasing","path":"/guides/analytics/user-aliasing/","order":7,"label":null},{"title":"Dashboards","path":"/guides/analytics/dashboards/","order":8,"label":null},{"title":"Analytics Resources","path":"/guides/analytics/resources/","order":10,"label":null},{"title":"User Segments","path":"/guides/analytics/user-segments/","order":10,"label":null},{"title":"Tutorials","path":"/guides/analytics/tutorials/","order":11,"label":null},{"title":"APIs","path":"/guides/analytics/apis/","order":12,"label":null},{"title":"Analytics (Deprecated)","path":"/guides/analytics/analytics-deprecated/","order":13,"label":null}],"metadataParent":{"title":"Guides","path":"/guides/","metadataChildren":[{"title":"Platform Overview","path":"/guides/platform-overview/","order":0.5,"label":null},{"title":"Getting Started","path":"/guides/getting-started/","order":1,"label":null},{"title":"mParticle Agent","path":"/guides/mparticle-agent/","order":1.5,"label":null},{"title":"Oversight","path":"/guides/oversight/","order":2,"label":null},{"title":"Data Platform","path":"/guides/data-platform/","order":3,"label":null},{"title":"Data Warehouse","path":"/guides/data-warehouse/","order":4,"label":null},{"title":"Customer 360","path":"/guides/customer-360/","order":5,"label":null},{"title":"Analytics","path":"/guides/analytics/","order":6,"label":null},{"title":"Audiences","path":"/guides/audiences/","order":7,"label":null},{"title":"Settings","path":"/guides/settings/","order":8,"label":null},{"title":"Troubleshooting mParticle","path":"/guides/troubleshooting/","order":10,"label":null},{"title":"Default Service Limits","path":"/guides/default-service-limits/","order":11,"label":null},{"title":"Glossary","path":"/guides/glossary/","order":12,"label":null}]}}}}}},"markdownRemark":{"html":"<aside class=\"warning\">\n<strong>Analytics Sunset</strong><br />\nWe began sunsetting mParticle Analytics on October 1, 2026. As a result, the features and workflows described on this page may no longer be available. This documentation is retained for reference. If you have questions about how this change affects your account, contact your mParticle account representative.\n</aside>\n<p><a href=\"https://github.com/Indicative/Indicative-Android/\"><br>\nDownload on GitHub</a></p>\n<p>Our Android library is available on Maven Central as an AAR artifact. If your project uses Gradle, you can integrate by adding the following dependency:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-text line-numbers\"><code class=\"language-text\">repositories {\n    mavenCentral()\n}\n\ndependencies {\n    compile &#39;com.indicative.client.android:Indicative-Android:1.0.1&#39;\n}</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>Otherwise, download the client and add the <code class=\"language-text\">Indicative.java</code> file (located in /src/com/indicative/client/java/android/) to your project.</p>\n<p>To start recording events, you’ll first have to create an instance of our <code class=\"language-text\">Analytics</code> object and initialize it with your API key. You can do this by calling our <code class=\"language-text\">launch()</code> method in the <code class=\"language-text\">onCreate()</code> method of your main Application class, like so:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-text line-numbers\"><code class=\"language-text\">Indicative.launch(getApplicationContext(), &quot;Your-API-key-goes-here&quot;);</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>To record an event, first create a <code class=\"language-text\">Map</code> of your property names and values:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-text line-numbers\"><code class=\"language-text\">Map&lt;String, String&gt; properties = new HashMap&lt;String, String&gt;();\nproperties.put(&quot;Age&quot;, &quot;23&quot;);\nproperties.put(&quot;Gender&quot;, &quot;Female&quot;);</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span></span></pre></div>\n<p>Next, simply call our <code class=\"language-text\">recordEvent()</code> method, passing in the event name, a unique user identifier, and the property map you just created: </p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-text line-numbers\"><code class=\"language-text\">Indicative.recordEvent(&quot;Registration&quot;, &quot;user47&quot;, properties);</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>This method creates a JSON representation of your event and adds it to a queue. Every 60 seconds, the events in that queue will be sent to our Rest API endpoint via HTTP POST requests. If debug mode is enabled via the debug <code class=\"language-text\">boolean</code>in <code class=\"language-text\">Indicative.java</code>, the status code and body of our response will be outputted to your device’s logs.</p>","frontmatter":{"title":"Android","order":6.4,"seoTitle":null,"seoDescription":null},"parent":{"__typename":"File","modifiedTime":"October 12, 2026"}}},"pageContext":{"slug":"/guides/analytics/analytics-deprecated/developer-docs/sdks/android/"}},"staticQueryHashes":["2950460867"]}