You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

To build Android SDK please read Java SDK page.

This is example of how we have implemented the android mobile app in BellaDati using MPAndroidChart library. We use the native components of this library to visualize stacked bar chart. The data to visualize are from BellaDati reports. This library is available  on git hub here: https://github.com/PhilJay/MPAndroidChart/

In order to use the library, there are 4 different options:

1. Gradle dependency (recommended)

  • Add the following to your project level build.gradle:

    allprojects {
        repositories {
            maven { url "https://jitpack.io" }
        }
    }
  • Add this to your app build.gradle:

    dependencies { 
    	compile 'com.github.PhilJay:MPAndroidChart:v3.0.1' 
    }

2. Maven

 

  • Add the following to the <repositories> section of your pom.xml:

    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>


  • Add the following to the <dependencies> section of your pom.xml:
     
    <dependency>
        <groupId>com.github.PhilJay</groupId>
        <artifactId>MPAndroidChart</artifactId>
        <version>v3.0.1</version>
    </dependency>

     

     

3. jar file only

  • Download the latest .jar file from the releases section
  • Copy the mpandroidchartlibrary-version.jar file into the libs folder of your Android application project
  • Start using the library

4. clone whole repository

  • Open your commandline-input and navigate to the desired destination folder on your machine (where you want to place the library)
  • Use the command git clone https://github.com/PhilJay/MPAndroidChart.git to download the full MPAndroidChart repository to your computer (this includes the folder of the library as well as the folder of the example project)
  • Import the library folder (MPChartLib) into Android Studio (recommended) or your Eclipse workspace
  • Add it as a reference to your project

After implementing the library you have to use xAuthentication from Java SDK page and get data in JSON format to Android.

After geting data is necessary to build your own adapter for data what you have.

The result of our implementation is below. This chart can be zoom-in/zoom-out and you can move on the x and y axis.

More example you can see here on our market place http://www.belladati.com/marketplace/mobile-overview/
  • No labels