LogoLogo
Insights
  • Introduction
  • A standard integration
  • FAQ
    • FAQ
      • Integration (FAQ)
      • Detections (FAQ)
      • Data interface (FAQ)
      • Security, Privacy and Terms of Service (FAQ)
      • Journeys and Insights (FAQ)
  • SDK
    • Getting Started
      • Android Quick Start
        • 1. Android Checklist
        • 2. Including the SDK
        • 3. Configuration
          • Sample Notification
        • 4. Initialization
        • 5. Starting Detections
        • 6. SDK Status Updates
        • 7. Permissions
        • 8. What's Next
      • iOS Quick Start
        • 1. iOS Checklist
        • 2. Installation
          • Installation with CocoaPods
          • Installation with Carthage
          • Manual Installation
        • 3. Configuration
          • Using Integration Guide
          • Manual Configuration
        • 4. Usage
        • 5. Tips and Guidelines
        • 6. What's Next
      • React Native Quick Start
        • 1. React Native Checklist
        • 2. Installation
        • 3. Configuration
        • 4. Initialization
        • 5. Usage
        • 6. What's Next
    • Appendix
      • Android
        • Android 10 Update Behavior
        • Android Battery Optimization
        • External SDK Dependencies
        • Manifest Permissions
        • Notification Management
      • iOS
        • App Store Privacy Section
        • App Store Release
        • iOS 13 permission changes
        • M1 Simulator Support
        • Swift Support
      • Control Sending Data
      • Controlled Detections
        • Automatic Detections
        • Automatic Detections with Forced Trips
        • Controlled Trips Only
        • Checking Trip Status
      • Custom User Metadata
      • Detecting Vehicle Crashes
      • Migration Guide
        • Android
        • iOS
      • React Native
      • SDK Initialization
      • User Credentials
      • User Linking
      • Xamarin
    • API Reference
      • Android
        • VehicleCrashDetection
          • VehicleCrashEvent
          • VehicleCrashListener
          • CrashCallback
        • InitState
        • MetaUserLinker
        • MetaUserLinkerAsync
        • MetaUserLinkerCallback
        • OnInitCallback
          • InitIssue
        • OnSdkStatusUpdateHandler
        • OnStartFinishedHandler
        • PoiAddress
        • PoiLocation
        • PointOfInterest
        • PoiPlace
        • ResetCallback
          • ResetFailureReason
        • SdkConfig
          • Builder
        • SdkException
        • SdkStatus
          • LocationSetting
          • Quota Status
          • StartStatus
        • Sentiance
        • SubmitDetectionsCallback
        • StationaryInfo
        • Token
        • TokenResultCallback
        • Trip
          • StartTripCallback
          • StopTripCallback
          • TransportMode
          • TripTimeoutListener
          • TripType
        • TripInfo
        • TripProfile
          • HardEvent
          • TransportSegment
          • VehicleMode
        • TripProfileConfig
          • Builder
        • TripProfileListener
        • UserActivity
        • UserActivityListener
        • UserActivityType
      • iOS
        • MetaUserLinker
        • SENTSDK
          • SENTSDKStatus
          • SENTPublicDefinitions
        • SENTConfig
        • SENTTripProcessingTripProfile
          • SENTTripProcessingTransportSegment
          • SENTTripProcessingHardEvent
          • SENTTripProcessingVehicleMode
        • SENTVehicleCrashEvent
      • React Native
    • Battery Optimization
    • How To
      • Check the Location Permissions
    • Troubleshooting
      • Android
      • iOS
        • Bundle format unrecognized, invalid, or unsuitable
        • Error: Undefined symbols for architecture arm64
    • Changelog
      • Android
      • iOS
  • Important topics
    • Authentication and Authorization
    • User linking
    • PlayStore Location Access Review
    • Privacy Report & Dashboard
    • Vehicle Crash Detection
  • Library
    • Events
    • Moments
    • Segments
    • Glossary
  • Backend
    • GraphQL
    • REST API Reference
      • Error Codes (REST API)
    • Offloads
    • Data Reference
      • Data Reference A-B
      • Data Reference C-G
      • Data Reference H-L
      • Data Reference M-P
      • Data Reference Q-T
      • Data Reference U-Z
  • Data Explorer
    • Data Explorer
      • Global (EU)
      • US
      • Australia
  • Guide
    • Firehose
    • Verifying your integration
    • SDK Standard License
    • Journeys License
    • Journeys Application
    • Journeys Privacy Policy
    • Technical & Organizational Measures
Powered by GitBook
On this page
  • Builder API
  • Builder
  • baseURL()
  • build()
  • setMetaUserLinker
  • setMetaUserLinker
  • setNotificationId
  • setOnSdkStatusUpdateHandler
  • setTriggeredTripsEnabled
  1. SDK
  2. API Reference
  3. Android
  4. SdkConfig

Builder

PreviousSdkConfigNextSdkException

Last updated 1 year ago

This document refers to deprecated parts of the platform and has been left intact to help customers with legacy integrations. In order to access the latest platform features and documentation, please go to https://docs.sentiance.com.

This class is used with .

Builder API

Builder

Builder(String appId, String secret, Notification notification)

Creates a builder object used for initializing the Sentiance SDK.

Please note: hard-coded credentials are not secure. Load your Sentiance credentials from a secure source such a remote server, and store them securely on the device.

Parameters

appId

The Sentiance app credential ID.

secret

The Sentiance app credential secret.

notification

baseURL()

Builder baseURL(String url)

Sets the Sentiance API URL.

Parameters

url

The Sentiance API URL.

build()

SdkConfig build()
Parameters

id

The ID used when starting a foreground service.

setMetaUserLinker

Builder setMetaUserLinker(MetaUserLinker linker)

Sentiance assigns to each user a unique ID. You can link your app's user to the Sentiance user using meta-user linking. The linking step involves server-to-server communication, and is triggered by the SDK via this meta-user linking callback.

Parameters

linker

setMetaUserLinker

Builder setMetaUserLinker(MetaUserLinkerAsync linker)
Parameters

linker

setNotificationId

Builder setNotificationId(int Id)

The default notification ID used by the SDK when starting a service is 2123874432. If your app already shows a persistent notification when running, you can pass your existing notification ID and have a single notification show up in the panel.

Parameters

id

The ID used when starting a foreground service.

setOnSdkStatusUpdateHandler

Builder setOnSdkStatusUpdateHandler(OnSdkStatusUpdateHandler handler)

At runtime, the SDK will occasionally send status updates to your app. These are concerning the detection status and environment changes (e.g. location availability, device configuration changes, etc.). You can set a handler here to capture these updates.

Parameters

handler

setTriggeredTripsEnabled

Builder setTriggeredTripsEnabled(boolean enabled)

Enables triggered trips mode on the SDK.

Parameters

enabled

true to enable triggered trips.

A used by the SDK when starting a foreground service.

Builds an object.

Learn more about Meta-User linking .

A which will handle the linking.

Same as but accepts an async linker instead.

A which will handle the linking.

The which will receive updates.

Learn more about triggered trips .

SdkConfig
here
here
setMetaUserLinker(MetaUserLinker)
Notification
MetaUserLinker
MetaUserLinkerAsync
OnSdkStatusUpdateHandler
SdkStatus
Sentiance.init(SdkConfig, OnInitCallback)