App SDK integration description
1 Applying License
For device security, all developers need to apply the license for SDK from BroadLink DNAKit Developer Portal. BroadLink DNAKit Developer Portal.
Note: The license is associated with your bundle ID. You need to apply different licenses for each bundle ID if necessary.
Procedure of application:
- Go to BroadLink DNAKit Developer Portal
- Log in with your account or register new one for developer.
- Wait for approval
- After approval, enter home page and go to Integration > SDK.
- Go to Manage license > Apply new license and fill in required information. If you also want to control third party devices, you need to specify the vendor name and model of specific device in note field and submit for approval.
- You will find the license on license management page after approval Note: Broadlink DNAKit Developer Portal is Chinese now,broadlink FAE can help you to apply the License.
2 Configuration for Android Project
Due to the suspension of the Jcenter server, the Android SDK download integration was modified to the Jitpack server. It needs to be modified as follows. > Current configuration for this SDK is
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 8
targetSdkVersion 23
}
}
1.Add the following codes in “build.gradle” in your project:
allprojects {
repositories {
maven {
url "https://jitpack.io"
credentials { username "jp_1a8mdfk363dfb7ebvqrcoovtpq" }
}
}
}
2.Add the following codes in “build.gradle” in App directory:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.github.broadlinksdk:BLLetBaseAndroid:2.15.1'
implementation 'com.github.broadlinksdk:BLLetCoreAndroid:2.17.1'
implementation 'com.github.broadlinksdk:BLLetIRCodeAndroid:2.14.10'
implementation 'com.github.broadlinksdk:BLLetAccountAndroid:2.13.3'
implementation 'com.github.broadlinksdk:BLSFamilyAndroid:1.0.8'
}
3.You need to add the following permissions in AndroidManifest.xml or apply the following permissions during invoking:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
Description
android.permission.WRITE_EXTERNAL_STORAGE
is a highly risky permission which will download control script to the phone during control. You can choose if the permission will be granted. You will be unable to control the device using dnacontrol interface if no script is found on phone.
Configuration for iOS Project
The SDK supports iOS version 8.0 and above and supports the following configuration methods:
Import in Cocoapods
Explanation for integration with Cocoapods:
- Please refer to Official website of Cocoapods for the installation of cocoapods. Cocoapods Official website
- Add specified Source as https://github.com/ibroadlink/BLLibSpecs.git in Podfile.
- You need to add the following sources in Podfile if you want to import BLLetCore:
pod 'BLLet/BLLetCore', '~> 2.9'
Example of Podfile:
source 'https://github.com/ibroadlink/BLLibSpecs.git'
source 'https://github.com/CocoaPods/Specs.git'
target 'BLAPPSDKDemo' do
pod 'BLLet', '~> 2.17'
end