Overview

Skill Level: Intermediate

Prerequisites

Not what you’re looking for? Check out all our available tutorials for mobile app messaging here.

Step-by-step

  1. Replace SDK in shared project

    1. Right click on the Shared Project’s References item and select Add Reference….
    2. Select the .Net Assembley tab.
    3. Uncheck IBMMobilePush.Forms.dll.
    4. Click the Browse button and locate the AcousticMobilePush.Forms.dll downloaded from the 3.8.0 package.
    5. Select OK.
    6. Replace all references to IBMMobilePush with AcousticMobilePush.
    7. Change all references to mailingId to use type `double?` instead of `string`.
  2. Replace SDK in android project

    1. Right click on the Android Project’s References item and select Add Reference….
    2. Select the .Net Assembley tab.
    3. Uncheck IBMMobilePush.Droid.dll and IBMMobilePush.Forms.dll.
    4. Click the Browse button and locate AcousticMobilePush.Droid.dll and AcousticMobilePush.Forms.dll downloaded from the 3.8.0 package.
    5. Select OK.
    6. Right click IBMMobilePush.Forms.Droid.cs in the Android project and click Remove.
    7. Right click the project, click Add and then Existing Files….
    8. Locate AcousticMobilePush.Froms.Droid.cs downloaded from the 3.8.0 package.
    9. Select OK.
    10. Replace all references to IBMMobilePush with AcousticMobilePush.
    11. Edit *AndroidManifest.xml*
      1. Set <application> `android:name` attribute to `co.acoustic.mobile.push.sdk.api.MceApplication`
      2. Set <provider> `android:name` attribute to `co.acoustic.mobile.push.sdk.db.Provider`
      3. Set the <receiver> with `android:name` attribute `com.ibm.mce.sdk.notification.NotifActionReceiver` to  `co.acoustic.mobile.push.sdk.notification.NotifActionReceiver` instead
      4. Set the <receiver> with `android:name` attribute `com.ibm.mce.sdk.wi.AlarmReceiver` to  `co.acoustic.mobile.push.sdk.wi.AlarmReceiver` instead
      5. Set the <service> with `android:name` attribute `com.ibm.mce.sdk.session.SessionTrackingIntentService` to `co.acoustic.mobile.push.sdk.session.SessionTrackingIntentService`
      6. Remove the <service> node with `android:name` attribute `com.ibm.mce.sdk.fcm.FcmMessagingService`
      7. Set the <service> with `android:name` attribute `com.ibm.mce.sdk.fcm.FcmInstanceIdService` to `co.acoustic.mobile.push.sdk.messaging.fcm.FcmMessagingService`
      8. Set the <service> with the `android:name` `com.ibm.mce.sdk.events.EventsAlarmListener` to `co.acoustic.mobile.push.sdk.events.EventsAlarmListener`
      9. Set the <service> with the `android:name` `com.ibm.mce.sdk.registration.PhoneHomeIntentService` to `co.acoustic.mobile.push.sdk.registration.PhoneHomeIntentService`
      10. Set the <service> with the `android:name` `com.ibm.mce.sdk.registration.RegistrationIntentService` to `co.acoustic.mobile.push.sdk.registration.RegistrationIntentService`
      11. Set the <service> with the `android:name` `com.ibm.mce.sdk.attributes.AttributesQueueConsumer` to `co.acoustic.mobile.push.sdk.attributes.AttributesQueueConsumer`
      12. Set the <service> with the `android:name` `com.ibm.mce.sdk.job.MceJobService` to `co.acoustic.mobile.push.sdk.job.MceJobService`
    12. If you’re using the Location Features Edit *AndroidManifest.xml*
      1. Set the `<receiver>` with `android:name` attribute `com.ibm.mce.sdk.location.LocationUpdateCaller` to `co.acoustic.mobile.push.sdk.location.LocationUpdateCaller`
      2. Set the `<service>` with the `android:name` `com.ibm.mce.sdk.location.LocationRetrieveService` to `co.acoustic.mobile.push.sdk.location.LocationRetrieveService`
      3. Remove the `<service>` with the `android:name` `com.ibm.mce.sdk.location.GeofenceIntentService`
      4. Add a node to the `<application>` node: `<receiver android:name=”co.acoustic.mobile.push.sdk.location.GeofenceBroadcastReceiver” android:enabled=”true” android:exported=”true” />`
      5. Add a node to the `<application>` node: `<receiver android:name=”co.acoustic.mobile.push.sdk.location.LocationBroadcastReceiver” android:enabled=”true” android:exported=”true” />`
      6. Set the `<service>` with the `android:name` `com.ibm.mce.sdk.location.LocationEventsIntentService` to `co.acoustic.mobile.push.sdk.location.LocationBroadcastReceiver`
      7. Set the `<service>` with the `android:name` `com.ibm.mce.sdk.location.LocationSyncAlarmListener` to `co.acoustic.mobile.push.sdk.location.LocationSyncAlarmListener`
      8. Set the `<service>` with the `android:name` `com.ibm.mce.sdk.beacons.MceBluetoothScanner` to `co.acoustic.mobile.push.sdk.beacons.MceBluetoothScanner`
      9. Set the `<service>` with the `android:name` `com.ibm.mce.sdk.beacons.BeaconsVerifier` to `co.acoustic.mobile.push.sdk.beacons.BeaconsVerifier`

    13. If you’re using the Snooze Plugin Edit *AndroidManifest.xml*.

    1. Set the <service> with the `android:name` `com.ibm.mce.sdk.plugin.snooze.SnoozeIntentService` to `co.acoustic.mobile.push.sdk.plugin.snooze.SnoozeIntentService`

    14. If you’re using the Inbox Plugin Edit *AndroidManifest.xml*.

    1. Set the <service> with the `android:name` `com.ibm.mce.sdk.plugin.inbox.InboxUpdateService` to `co.acoustic.mobile.push.sdk.plugin.inbox.InboxUpdateService`

    15. Double cick on the Android Project.

    1. Select the General tab, make sure the target framework is `Android 9.0 Pie`.

    2. Select the Android Application tab, make sure the `Target Android version` is `Android 9.0 (API level 28)`.

    16. Right click on the Packages of the Android Project, tap Update.

    17. Right click on the Packages of the Android Project, tap Manage NuGet Packages.

    18. Right click CustomMapRenderer.cs and click Remove.

    19. Right click Android Project and click Add then Existing Files… select samples/Sample/Droid/Custom Controls/CustomMapRenderer.cs from 3.8.0 Package.

    20. Change all references to mailingId to use type `double?` instead of `string`.

  3. Replace SDK in iOS project

    1. Right click on the iOS Project’s References item and select Add Reference….
    2. Select the .Net Assembley tab.
    3. Uncheck IBMMobilePush.iOS.dll and IBMMobilePush.Forms.dll.
    4. Click the Browse button and locate AcousticMobilePush.iOS.dll and AcousticMobilePush.Forms.dll downloaded from the 3.8.0 package.
    5. Press OK.
    6. Right click IBMMobilePush.Forms.iOS.cs in the iOS project, click Remove.
    7. Right click the project, click Add and then Existing Files….
    8. Locate AcousticMobilePush.Froms.iOS.cs downloaded from the 3.8.0 package.
    9. Press OK.
    10. Replace all references to IBMMobilePush with AcousticMobilePush.
    11. Change all references to mailingId to use type `double?` instead of `string`.
  4. 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 colors. Each xaml element is then modified to refer to the globally defined colors for their interface elements’s foreground and background colors as needed.

    See the Sample app for examples of how this works in practice.

  5. Android

    In additon, 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.

  6. iOS

    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.

Expected outcome

Need more help? Check out all of our available tutorials for mobile app messaging here.

Join The Discussion

Your email address will not be published. Required fields are marked *