Flutter SDK

flutter sdk


# How to Use?

<p>[TOC]</p> <h1>1. New a Project</h1> <ul> <li>Create a Flutter Plugin project using Android Studio or other development tools.</li> </ul> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=01627f77e89bea7b36f6dc304fa47f5f&amp;amp;file=file.png" alt="" /></p> <h1>2. Include 3rd-Party Libraries</h1> <h2>iOS</h2> <ul> <li>Import the SDK and .h file into the &quot;flutter_tunnel.podspec&quot;,and copy it to the corresponding folder directory.</li> </ul> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=78df574c1d671a199093d129c3b7910a&amp;amp;file=file.png" alt="" /></p> <p>&gt; Note: When compiling, it is necessary to include the &quot;libz.tbd&quot; library in the &quot;.xcodeproject&quot;.</p> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=e9a58cdbfee60257b6058398b169e565&amp;amp;file=file.png" alt="" /></p> <h2>Android</h2> <ul> <li>Import the SDK file into the &quot;build.gradle&quot; file and copy it to the corresponding folder directory.</li> </ul> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=2aa7a14929af2d0a3fa69a5eb746edb7&amp;amp;file=file.png" alt="" /></p> <h1>3. Development</h1> <ul> <li>The &quot;flutter_tunnel.dart&quot; file contains calls to implement Tunnel related APIs, and the UI layer can call methods of this calss.</li> </ul> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=8ba58de3b62bad38786f698394528213&amp;amp;file=file.png" alt="" /></p> <ul> <li>In the local Flutter project, import flutter_tunnel plugin</li> </ul> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=f0ca51ff6fb8a7285596c8aa2bf4db24&amp;amp;file=file.png" alt="" /></p> <h1>4. How to demo?</h1> <h2>Demo Installation</h2> <p>![Flutter SDK_230915](<a href="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=55234a4bcdbe77eadc49c8c353b34925&amp;file=file.png">https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=55234a4bcdbe77eadc49c8c353b34925&amp;file=file.png</a> &quot;Flutter SDK_230915&quot;)</p> <h3>IOS Installation Guide</h3> <ul> <li>System requirements: IOS 10.0 and above.</li> <li> <p>Method One: a. Use the mobile phone system scanning tool (wechat or Alipay scanning is not supported for now); b. Scan the QR code above to get the download link address; c. The mobile phone can automatically identify the download address and pop up an installation prompt dialog box; d. Click &quot;Install&quot; and wait for the app installation to complete.</p> </li> <li> <p>Method Two: a. Use a third-party code scanning tool (wechat or Alipay scanning is not supported for now); b. Scan the QR code above to get the download link address; c. Click the link, or paste the download link address into the Safari browser and go, a prompt pops up: &quot;Open the link in 'iTunes'?&quot; d. Click &quot;Open&quot;, and the installation prompt dialog box will pop up; e. Click &quot;Install&quot; and wait for the app installation to complete.</p> </li> <li>When starting the app for the first time, if you encounter the prompt &quot;Untrusted Enterprise Developer&quot;, please do the following: a. Enter the mobile phone system settings, click &quot;General&quot;; b. Find “Device Management” and check it, click “Throughtek Co., Ltd.”; c. After clicking Trust “Throughtek Co., Ltd.”, restart the application.</li> </ul> <hr /> <h3>Android Installation Guide</h3> <ul> <li>System requirements: Android 7.0 and above. a. Use browser scanning tools, or third-party scanning tools (wechat or Alipay scanning is not supported for now); b. Scan the QR code above to get the download link address; c. Click the link, or paste the download link address into the browser and open it; d. After clicking &quot;Download&quot;, enter the browser download interface to check the progress and wait for the download to complete; e. Click &quot;Install&quot; and complete the installation steps according to the operation of the mobile phone.</li> </ul> <p>&gt; Note: The detailed operation steps are still subject to the behavior of the third-party scanning tool/browser/mobile phone system actually used, and the above is only for reference.</p> <h2>Call API Steps</h2> <ul> <li>Step1. Call TK_initSDK Success(return code 0);</li> <li>Step2. Call TK_tunnelConnect Success(return code 0);</li> <li>Step3. Call TK_startPortMapping Success(return code 0);</li> <li>Step4. Make Sure the ip:localport setting in the sample code,and try to copy the url(such as <a href="http://127.0.0.1:10000/nas">http://127.0.0.1:10000/nas</a> ) to the browser,data access successful;</li> <li>Step5. Call TK_stopPortMapping(return code 0) to exit port mapping setting;</li> <li>Step6. Call TK_disconnectTunnel(return code 0) to exit the tunnel connection;</li> <li>Step7. Call TK_unInitThunnel(return code 0) to uninitial IOTC Module;</li> </ul> <p>&gt; Note: If return error code when call api, your can refer the readme file in standard SDK to check the abnormal situation.</p> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=725fb7534adcae20a8a7b1c9d7e2010b&amp;amp;file=file.png" alt="" /></p> <h1>5. Note</h1> <ul> <li>Flutter Compilation Environment</li> <li>Flutter 2.10.1</li> <li>Tools • Dart 2.16.1 • DevTools 2.9.2</li> </ul>

页面列表

ITEM_HTML