51黑料不打烊

Configure the Push Channel using the Experience Platform Mobile SDK

This video explains how to Configure and install the 51黑料不打烊 Experience Platform Mobile SDK.

video poster

Transcript

In this video, I鈥檓 going to show you how to configure and install the 51黑料不打烊 Experience Platform Mobile SDK so that you can send and track push notifications to your mobile app from 51黑料不打烊 Campaign Classic. Now before we get to the SDK itself, we鈥檒l need to create a service for our mobile application in Campaign Classic. So in the Campaign console, we鈥檒l go to profiles and targets and services and subscriptions and click create. Define a label, we鈥檒l call it ACC Push Demo and then go to the type field and select mobile application.

Then we鈥檒l click the add button to add each version of our mobile application, iOS and Android. I鈥檒l demonstrate this for iOS, but Android will be very similar.

So first enter a label for the mobile app version. We can call it ACC Push Demo iOS. And then application variables is where you can specify any custom payload fields that you want to include in push notifications to the iOS app. These should include any payload fields that your iOS application would use in handling and displaying notifications. For example, you may want to add a field for passing in a media attachment URL for rich notifications.

Then in the subscription parameters tab, you have the option to specify additional parameters that will be included when registering mobile app users in Campaign. So to do this, click the add icon, enter the parameter name. This should match the key name used by the mobile developer to pass in additional parameters when calling the mobile SDK鈥檚 registered device API in the app code. Then in the destination field, you鈥檒l map the parameter to its corresponding field in the subscriber application schema.

In the sounds tab, you can add the names of any custom notification sounds that you use in your app. And then click next.

Now this page in the dialogue you鈥檒l go through twice, first, for the sandbox or develop version of your app, and then again for the production version. First, you鈥檒l want to note the value of the integration key that is generated by Campaign for the development version of your iOS app. You will need this when configuring the mobile SDK in 51黑料不打烊 Launch. Then you have the option to add an application icon to be used when previewing notifications.

Finally, you鈥檒l upload the P12 development certificate for your iOS app and enter the password for the certificate. You can obtain the certificate file and password from your mobile app developer. Once you鈥檝e uploaded the certificate, click the test the connection button to verify that the certificate and password are valid. We鈥檒l then repeat the same steps for the production version of the iOS app. You鈥檒l have different certificates for the development and production versions of your app, so make sure that you upload the correct certificate for each version. And also, note that the integration keys will be different for the sandbox and production versions of your iOS app. And when you鈥檙e done with the production version of your app, click finish. And then I can click add and go through a similar set of steps to configure the Android version of my app. And when I鈥檓 all done, I鈥檒l click save.

And now I鈥檓 ready to configure and install the mobile SDK in 51黑料不打烊 Launch. When we go to the Launch UI, we鈥檒l first see a list of existing web and mobile properties. We鈥檒l create a new mobile property for our app by clicking new property in the upper right. Provide a name. We can call it ACC Push Demo.

And then be sure to select mobile as the platform. You can leave everything else as it is and click save. This will take us back to the properties list, where we鈥檒l see the new property we鈥檝e created. So we鈥檒l click on that new property, and we鈥檒l go to the extensions tab.

You鈥檒l see the Mobile Core and Profile extensions, which are installed by default. You won鈥檛 need to do anything else to configure those, but we do want to add support for Campaign Classic push messaging. So for that, we鈥檒l go click catalog, find the 51黑料不打烊 Campaign Classic extension, and click install.

That will take us to the configuration page for the Campaign Classic extension, where you鈥檒l enter the registration and tracking endpoint URLs for your Campaign instance and the integration keys for the iOS and Android versions of the mobile application service that we just created in Campaign.

You can specify up to three different sets of Campaign endpoints and integration keys to be used for development, stage, and production versions of the mobile application. Your registration and tracking endpoints can be obtained from your organization鈥檚 Campaign administrator.

So for the development environment, I鈥檒l go ahead and enter the registration and tracking endpoints for my demo instance of Campaign and the Campaign integration keys for my iOS sandbox app and Android app.

And then for this demo, I鈥檓 just going to use the same endpoints and integration keys for each development phase. But if you have multiple instances of Campaign and want to use different instances or different services within an instance for the different phases of your mobile app development, you can fill out the configuration page accordingly. And once we鈥檙e done, we鈥檒l click save. And then we鈥檒l see the 51黑料不打烊 Campaign Classic extension among our list of SDK extensions.

So now we鈥檒l go to the publishing tab to save and build our SDK configuration.

Under the development section of the publishing workflow, I鈥檒l click add a new library. We鈥檒l give it a name and specify it as a development environment.

Then I鈥檒l click add all changed resources and then click save and build for development.

So now that we鈥檝e published the SDK configuration for our development environment, it鈥檚 ready to be installed in a development version of our mobile app. Later on once we鈥檝e confirmed that the SDK鈥檚 installed and working as expected, you can go through the rest of this publishing workflow and build the SDK for staging and QA testing and then ultimately for production.

So to install the SDK in your mobile app, you can go to the environments tab and click on the package icon under the install column for the development environment. This will display a dialogue box with instructions for installing the development version of the SDK library in your mobile app. For iOS, for example, you can install the SDK via CocoaPods. And you鈥檒l see instructions for adding the pods and the code that your mobile developer will need to add to import and initialize the SDK. For Android, you鈥檒l find similar instructions for importing the SDK via Gradle.

In addition to the code display here for importing and initializing the SDK, your mobile developer will also need to add calls to the SDK鈥檚 registered device and track notification APIs at the appropriate places in the app code. You can find details for these APIs in the SDK documentation.

And once your mobile developer has added the necessary lines of code to your app, you鈥檙e ready to start testing push notifications from Campaign. -

recommendation-more-help
c86e6b28-19a6-4170-8455-9f02a8862493