@@ -44,7 +44,9 @@ To install mParticle on an Android platform:
4444
4545``` groovy
4646dependencies {
47- implementation 'com.mparticle:android-core:5+'
47+ implementation 'com.mparticle:android-core:5.79.0'
48+ // Required only if you use Rokt APIs from Flutter
49+ implementation 'com.mparticle:android-rokt-kit:5.79.0'
4850
4951 // Required for gathering Android Advertising ID (see below)
5052 implementation 'com.google.android.gms:play-services-ads-identifier:16.0.0'
@@ -63,13 +65,16 @@ package com.example.myapp;
6365
6466import android.app.Application ;
6567import com.mparticle.MParticle ;
68+ import com.mparticle.MParticleOptions ;
69+ import com.mparticle.networking.NetworkOptions ;
6670
6771public class MyApplication extends Application {
6872 @Override
6973 public void onCreate () {
7074 super . onCreate();
7175 MParticleOptions options = MParticleOptions . builder(this )
7276 .credentials(" REPLACE ME WITH KEY" ," REPLACE ME WITH SECRET" )
77+ .networkOptions(NetworkOptions . withNetworkOptions(" https://rkt.example.com" ))
7378 .setLogLevel(MParticle . LogLevel . VERBOSE )
7479 .identify(identifyRequest)
7580 .identifyTask(
@@ -88,12 +93,14 @@ public class MyApplication extends Application {
8893``` kotlin
8994import com.mparticle.MParticle
9095import com.mparticle.MParticleOptions
96+ import com.mparticle.networking.NetworkOptions
9197
9298class ExampleApplication : Application () {
9399 override fun onCreate () {
94100 super .onCreate()
95101 val options = MParticleOptions .builder(this )
96102 .credentials(" REPLACE ME WITH KEY" , " REPLACE ME WITH SECRET" )
103+ .networkOptions(NetworkOptions .withNetworkOptions(" https://rkt.example.com" ))
97104 .build()
98105 MParticle .start(options)
99106 }
@@ -117,7 +124,7 @@ To install mParticle on an iOS platform:
1171242 . Install the SDK using CocoaPods:
118125
119126``` bash
120- $ # Update your Podfile to depend on 'mParticle-Apple-SDK' version 9.1 .0 or later
127+ $ # Update your Podfile to depend on 'mParticle-Apple-SDK' version 9.2 .0 or later
121128$ pod install
122129```
123130
@@ -136,6 +143,9 @@ func application(_ application: UIApplication, didFinishLaunchingWithOptions lau
136143
137144 // Override point for customization after application launch.
138145 let mParticleOptions = MParticleOptions (key : " <<<App Key Here>>>" , secret : " <<<App Secret Here>>>" )
146+ let networkOptions = MPNetworkOptions ()
147+ networkOptions.customBaseURL = URL (string : " https://rkt.example.com" )
148+ mParticleOptions.networkOptions = networkOptions
139149
140150 // Please see the Identity page for more information on building this object
141151 let request = MPIdentityApiRequest ()
@@ -182,6 +192,9 @@ Next, you'll need to start the SDK:
182192
183193 MParticleOptions *mParticleOptions = [MParticleOptions optionsWithKey:@"REPLACE ME"
184194 secret:@"REPLACE ME"];
195+ MPNetworkOptions *networkOptions = [MPNetworkOptions new];
196+ networkOptions.customBaseURL = [NSURL URLWithString:@"https://rkt.example.com"];
197+ mParticleOptions.networkOptions = networkOptions;
185198
186199 //Please see the Identity page for more information on building this object
187200 MPIdentityApiRequest *request = [MPIdentityApiRequest requestWithEmptyUser];
0 commit comments