Integrating SciChart libraries
In this article we are going to show different approaches off integrating SciChart library into your Android Application:
Integrating SciChart manually
After you have downloaded and unzipped the SciChart Android Trial package, you can find SciChart Android AARs
in Lib folder.
Now, let's add them as build dependencies. To do this we need to:
- open the "build.gradle" file for the project and declare a new repository in the "repositories" node inside the "allprojects" node, pointing to the location of SciChart Android libraries:
repositories {
flatDir{dirs 'libs'}
}
- open the "build.gradle" file for a module which SciChart is intended to be used within. Add SciChart Android libraries as module dependencies:
// Declare SciChart libraries from local AARs as module dependencies
implementation 'com.scichart:charting:+@aar'
implementation 'com.scichart:charting3d:+@aar'
implementation 'com.scichart:core:+@aar'
implementation 'com.scichart:drawing:+@aar'
implementation 'com.scichart:data:+@aar'
// Declare SciChart extension from local AARs as module dependencies
implementation 'com.scichart:extensions:+@aar'
implementation 'com.scichart:extensions3d:+@aar'
Integrating SciChart using Maven
The SciChart Android Maven repository URL is https://www.myget.org/F/abtsoftware/maven.Follow the steps below to configure your project to reference the SciChart Android libraries from Maven.
- Open the "build.gradle" file for the project and declare a new Maven repository in the "repositories" node. Use the URL from above:
repositories {
google()
mavenCentral()
// Declare a Maven repository for SciChart
maven { url 'https://www.myget.org/F/abtsoftware-bleeding-edge/maven' }
maven { url 'https://www.myget.org/F/abtsoftware/maven' }
}
- Open the "build.gradle" file for a module which SciChart is intended to be used within. Add SciChart Android libraries as module dependencies:
def sciChart_version = "4.5.0.4851"
// Declare SciChart libraries as module dependencies
implementation (group: 'com.scichart.library', name: 'core', version: sciChart_version, ext: 'aar')
implementation (group: 'com.scichart.library', name: 'data', version: sciChart_version, ext: 'aar')
implementation (group: 'com.scichart.library', name: 'drawing', version: sciChart_version, ext: 'aar')
implementation (group: 'com.scichart.library', name: 'charting', version: sciChart_version, ext: 'aar')
implementation (group: 'com.scichart.library', name: 'charting3d', version: sciChart_version, ext: 'aar')
// Declare SciChart extension library as module dependencies
implementation (group: 'com.scichart.library', name: 'extensions', version: sciChart_version, ext: 'aar')
implementation (group: 'com.scichart.library', name: 'extensions3d', version: sciChart_version, ext: 'aar')
Integrating SciChart using NuGet Package Manager
NuGet is a package manager for Visual Studio and .NET. It allows you to add a reference to a DLL and download it from the cloud. There is no need to keep DLLs in version control or install them on local disk. You can download them on-demand and link against them during your build process.
In order to get SciChart libraries, you should connect to our Private Feed. SciChart provides 2 feeds:
- SciChart Official Releases Feed URLs:
- Visual Studio 2015+ - https://www.myget.org/F/abtsoftware/api/v3/index.json
- Visual Studio 2012+ - https://www.myget.org/F/abtsoftware/api/v2
- SciChart Nightly Builds Feed URLs:
- Visual Studio 2015+ - https://www.myget.org/F/abtsoftware-bleeding-edge/api/v3/index.json
- Visual Studio 2012+ - https://www.myget.org/F/abtsoftware-bleeding-edge/api/v2
Note
*.nupkg
files can be unzipped if you rename them as zip. They contain the SciChart DLLs. So, even if you are not using NuGet, you can get our nightly builds by clicking the download button on the gallery page and unzipping the package.
After adding the desired feed from the above in Visual Studio select View -> Other Windows -> Package Manager Console, then Type Install-package SciChart.Android
in the console and click Enter. This will isntall the latest build of SciChart.Android.
That's it. You are good to go.