Send your event data from RudderStack to Visual Studio App Center.
7 minute read
App Center is Microsoft’s cross-platform build automation and management platform that lets you seamlessly manage your app’s lifecycle. With App Center, you can easily manage and automate your builds, effectively test your apps in the cloud, and monitor their real-time usage with the help of crash data and analytics.
RudderStack lets you send your event data to App Center via its native web SDKs.
Once you have confirmed that the platform supports sending events to App Center, perform the steps below:
From your RudderStack dashboard, add the source and select App Center from the list of destinations.
Name your destination, and click Next. You should be able to see the following screen:
Enter the relevant details and click Next to complete the setup. The API Secret Key can be found as App Secret on the Getting Started page or Settings page on the App Center portal.
Adding device mode integration
Once you add App Center as a destination in the RudderStack dashboard, follow these steps to add it to your mobile project depending on your integration platform:
Your Android project must be on version 5.0 (API level 21) or higher for RudderStack to be able to send events to App Center.
Once confirmed, follow these steps to add App Center to your Android project:
Add the following dependencies to your app/build.gradle file as shown:
To use App Center, your iOS project must be set up in Xcode 11 or later on macOS version 10.14.4 or later. Also, you must be targeting devices running on iOS 9.0 or later.
This device mode integration is supported for App Center v4.4.1 and above.
Follow these steps to add App Center to your iOS project:
Install RudderAppCenter (available through CocoaPods) by adding the following line to your Podfile:
pod'RudderAppCenter','~> 1.0.0'
Run the pod install command.
Next, import the SDK depending on your preferred platform:
@importRudderAppCenter;
importRudderAppCenter
Next, add the imports to your AppDelegate file under didFinishLaunchingWithOptions method:
To add AppCenter to your React Native project, follow these steps:
Add the RudderStack-App Center module to your app as shown:
npm install @rudderstack/rudder-integration-appcenter-react-native
## OR ##yarn add @rudderstack/rudder-integration-appcenter-react-native
Make sure the minSdkVersion of your build.gradle in the root of android directory is atleast 21
2. Run `pod install` inside the `ios` directory of your project adding `@rudderstack/rudder-integration-appcenter-react-native` to your project.
3. Finally, import the module you added above and add it to your SDK initialization code:
then RudderStack will send the data to App Center as:
{"city":"New Orleans","state":"Louisiana"}
Screen
The screen method allows you to record whenever a user sees the mobile screen, along with any associated optional properties. This call is similar to the page call, but is exclusive to your mobile device.
A sample screen call using the RudderStack Android SDK looks like the following code snippet:
In the above snippet, RudderStack captures the information related to the screen being viewed, such as screen’s name and category.
The above screen call is directly passed on to App Center as a track event via its trackEvent API, with event name as Viewed {screen name} screen along with the its properties. The above example will be sent as a track event with name Viewed MainActivity screen along with its properties.
Opting in/out of sending user data to App Center
Any users visting your app can express their consent over sending data to App Center. Based on this consent you can either opt in or out of sending that user’s data to App Center.
Refer to the section below for more details on how to use this feature.
Then add the below script just after the initialization of the Android SDK:
rudderClient.onIntegrationReady("App Center"){// have your own logic to get the user consent
if(userConsent){// enabling appcenter's analytics module
Analytics.setEnabled(true)}else{// disabling appcenter's analytics module
Analytics.setEnabled(false)}}
Firstly import the Appcenter’s Analytics Module as shown below:
@importAppCenterAnalytics;
Then add the below script just after the initialization of the iOS SDK:
The API Secret Key can be found as App Secret on the Getting Started page or Settings page on your App Center portal.
What is transmission interval?
The App Center SDK uploads logs in a batch of 50. If the SDK doesn’t have 50 logs to send, it will still send logs after 3 seconds (set by default). There can be a maximum of 3 batches sent in parallel. In this case, this interval of 3 seconds is the transmission interval. Note that the value of this transmission interval must always be between 3 seconds and 86400 seconds (one day).
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.