This document mainly describes how to install and use the SLS Android SDK. If you have not yet activated or do not know about the SLS service, log on to the SLS Product Homepage for more help.
- Android 2.3 or above
- You must have registered an Alibaba Cloud account with the SLS activated.
SLS Android SDK is dependent on fastjson.
you can use it through the Gradle.
compile 'com.aliyun.openservices:aliyun-log-android-sdk:0.4.0'
# clone工程
$ git clone https://github.com/aliyun/aliyun-log-android-sdk.git
# 进入目录
$ cd aliyun-log-android-sdk/aliyun-sls-android-sdk/
# run task(must jdk 1.7 above)
$ ../gradlew releaseJar
# location
$ cd build/libs && ls
The following are the Android permissions needed by the SLS Android SDK. Please make sure these permissions are already set in your AndroidManifest.xml
file. Otherwise, the SDK will not work normally.
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
The basic processes for uploading log is demonstrated below. For details, you can refer to the following directories of this project:
the sample directory: click to view details.
- Apache License 2.0.