Migrate Xamarin SDK from 3.3.2.5 to 3.8.0
Replace SDK in shared project
- Right-click on the Shared Project's References item and select Add Reference....
- Select the .Net Assembley tab.
- Uncheck IBMMobilePush.Forms.dll.
- Click the Browse button and locate the AcousticMobilePush.Forms.dll downloaded from the 3.8.0 package.
- Select OK.
- Replace all references to IBMMobilePush with AcousticMobilePush.
- Change all references to
mailingId
to use typedouble?
instead ofstring
.
Replace SDK in android project
- Right-click on the Android Project's References item and select Add Reference....
- Select the .Net Assembly tab.
- Uncheck IBMMobilePush.Droid.dll and IBMMobilePush.Forms.dll.
- Click the Browse button and locate AcousticMobilePush.Droid.dll and AcousticMobilePush.Forms.dll downloaded from the 3.8.0 package.
- Select OK.
- Right-click IBMMobilePush.Forms.Droid.cs in the Android project and click Remove.
- Right-click the project, click Add and then Existing Files....
- Locate AcousticMobilePush.Froms.Droid.cs downloaded from the 3.8.0 package.
- Select OK.
- Replace all references to IBMMobilePush with AcousticMobilePush.
- Edit AndroidManifest.xml
- Set
android:name
attribute toco.acoustic.mobile.push.sdk.api.MceApplication
- Set
android:name
attribute toco.acoustic.mobile.push.sdk.db.Provider
- Set the with
android:name
attributecom.ibm.mce.sdk.notification.NotifActionReceiver
toco.acoustic.mobile.push.sdk.notification.NotifActionReceiver
instead - Set the with
android:name
attributecom.ibm.mce.sdk.wi.AlarmReceiver
toco.acoustic.mobile.push.sdk.wi.AlarmReceiver
instead - Set the with
android:name
attributecom.ibm.mce.sdk.session.SessionTrackingIntentService
toco.acoustic.mobile.push.sdk.session.SessionTrackingIntentService
- Remove the node with
android:name
attributecom.ibm.mce.sdk.fcm.FcmMessagingService
- Set the with
android:name
attributecom.ibm.mce.sdk.fcm.FcmInstanceIdService
toco.acoustic.mobile.push.sdk.messaging.fcm.FcmMessagingService
- Set the with the
android:name
com.ibm.mce.sdk.events.EventsAlarmListener
toco.acoustic.mobile.push.sdk.events.EventsAlarmListener
- Set the with the
android:name
com.ibm.mce.sdk.registration.PhoneHomeIntentService
toco.acoustic.mobile.push.sdk.registration.PhoneHomeIntentService
- Set the with the
android:name
com.ibm.mce.sdk.registration.RegistrationIntentService
toco.acoustic.mobile.push.sdk.registration.RegistrationIntentService
- Set the with the
android:name
com.ibm.mce.sdk.attributes.AttributesQueueConsumer
toco.acoustic.mobile.push.sdk.attributes.AttributesQueueConsumer
- Set the with the
android:name
com.ibm.mce.sdk.job.MceJobService
toco.acoustic.mobile.push.sdk.job.MceJobService
- If you're using the Location Features Edit AndroidManifest.xml
- Set the
<receiver>
withandroid:name
attributecom.ibm.mce.sdk.location.LocationUpdateCaller
toco.acoustic.mobile.push.sdk.location.LocationUpdateCaller
- Set the
<service>
with theandroid:name
com.ibm.mce.sdk.location.LocationRetrieveService
toco.acoustic.mobile.push.sdk.location.LocationRetrieveService
- Remove the
<service>
with theandroid:name
com.ibm.mce.sdk.location.GeofenceIntentService
- Add a node to the
<application>
node:<receiver android:name="co.acoustic.mobile.push.sdk.location.GeofenceBroadcastReceiver" android:enabled="true" android:exported="true" />
- Add a node to the
<application>
node:<receiver android:name="co.acoustic.mobile.push.sdk.location.LocationBroadcastReceiver" android:enabled="true" android:exported="true" />
- Set the
<service>
with theandroid:name
com.ibm.mce.sdk.location.LocationEventsIntentService
toco.acoustic.mobile.push.sdk.location.LocationBroadcastReceiver
- Set the
<service>
with theandroid:name
com.ibm.mce.sdk.location.LocationSyncAlarmListener
toco.acoustic.mobile.push.sdk.location.LocationSyncAlarmListener
- Set the
<service>
with theandroid:name
com.ibm.mce.sdk.beacons.MceBluetoothScanner
toco.acoustic.mobile.push.sdk.beacons.MceBluetoothScanner
- Set the
<service>
with theandroid:name
com.ibm.mce.sdk.beacons.BeaconsVerifier
toco.acoustic.mobile.push.sdk.beacons.BeaconsVerifier
- If you're using the Snooze Plugin Edit AndroidManifest.xml.
- Set the with the
android:name
com.ibm.mce.sdk.plugin.snooze.SnoozeIntentService
toco.acoustic.mobile.push.sdk.plugin.snooze.SnoozeIntentService
- If you're using the Inbox Plugin Edit AndroidManifest.xml.
- Set the with the
android:name
com.ibm.mce.sdk.plugin.inbox.InboxUpdateService
toco.acoustic.mobile.push.sdk.plugin.inbox.InboxUpdateService
- Double click on the Android Project.
- Select the General tab, make sure the target framework is
Android 9.0 Pie
. - Select the Android Application tab, make sure the
Target Android version
isAndroid 9.0 (API level 28)
.
-
Right-click on the Packages of the Android Project, tap Update.
-
Right-click on the Packages of the Android Project, tap Manage NuGet Packages.
-
Right-click CustomMapRenderer.cs and click Remove.
-
Right-click Android project and click Add then Existing Files... select samples/Sample/Droid/Custom Controls/CustomMapRenderer.cs from 3.8.0 Package.
-
Change all references to
mailingId
to use typedouble?
instead ofstring
.
Replace SDK in iOS project
- Right-click on the iOS Project's References item and select Add Reference....
- Select the .Net Assembly tab.
- Uncheck IBMMobilePush.iOS.dll and IBMMobilePush.Forms.dll.
- Click the Browse button and locate AcousticMobilePush.iOS.dll and AcousticMobilePush.Forms.dll downloaded from the 3.8.0 package.
- Press OK.
- Right-click IBMMobilePush.Forms.iOS.cs in the iOS project, click Remove.
- Right-click the project, click Add and then Existing Files....
- Locate AcousticMobilePush.Froms.iOS.cs downloaded from the 3.8.0 package.
- Press OK.
- Replace all references to IBMMobilePush with AcousticMobilePush.
- Change all references to
mailingId
to use typedouble?
instead ofstring
.
Dark mode support
In order to support Dark Mode on iOS 13+ and Android 10+, it is recommended that you use a DynamicResource
with two custom themes. This requires two XAML files, one for each theme as well as an <color>
node for each globally defined color. Each XAML element is then modified to refer to the globally defined colors for their interface elements' foreground and background colors as needed.
See the sample app for examples of how this works in practice.
Android support
In addition, in Android, you'll need a custom page renderer that selects the correct theme for the current situation. See the Sample app for examples of how this works in practice.
iOS support
iOS will also need a custom page renderer that selects the correct theme for the current situation. See the Sample app for examples of how this works in practice.
Updated 8 months ago