react-native-mtk-smartconfig
v0.0.4
Published
Downloads
27
Readme
react-native-mtk-smartconfig
Announcement
Not finished yet. Android module is done but iOS is still under development.
Smart config can be used for MT7687,MT7697, MT2523.
A wrapped module with sdk for normal public version : LinkIt_SDK_V4.6.1_public
https://docs.labs.mediatek.com/resource/mt7687-mt7697/zh_tw/downloads
Getting started
$ npm install react-native-mtk-smartconfig --save
Mostly automatic installation
$ react-native link react-native-mtk-smartconfig
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-mtk-smartconfig
and addRNMtkSmartconfig.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNMtkSmartconfig.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.mtk.smartconfig.RNMtkSmartconfigPackage;
to the imports at the top of the file - Add
new RNMtkSmartconfigPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-mtk-smartconfig' project(':react-native-mtk-smartconfig').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-mtk-smartconfig/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-mtk-smartconfig')
Windows
- In Visual Studio add the
RNMtkSmartconfig.sln
innode_modules/react-native-mtk-smartconfig/windows/RNMtkSmartconfig.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Mtk.Smartconfig.RNMtkSmartconfig;
to the usings at the top of the file - Add
new RNMtkSmartconfigPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNMtkSmartconfig from 'react-native-mtk-smartconfig';
// TODO: What to do with the module?
RNMtkSmartconfig;