Commit b1e36fde by 1256748979@qq.com

init

parent d041c3a7
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
...@@ -40,11 +40,11 @@ android { ...@@ -40,11 +40,11 @@ android {
} }
dependencies { dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0' implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.+' testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation project(':wandun')
} }
\ No newline at end of file
cmake_minimum_required(3.10.2) cmake_minimum_required(VERSION 3.10.2)
project(Wandun) project(Wandun)
...@@ -6,4 +6,6 @@ include_directories(${CMAKE_SOURCE_DIR}/include) ...@@ -6,4 +6,6 @@ include_directories(${CMAKE_SOURCE_DIR}/include)
add_library(wdun add_library(wdun
SHARED SHARED
) core.cpp)
\ No newline at end of file
target_link_libraries(wdun log)
\ No newline at end of file
//
// Created by 12567 on 2021/3/31.
//
package com.reyun.wandun; package com.reyun.wandun;
public interface WdIdCallback { public interface WdCallback {
String onWdId(String wdId); String onWdId(String wdId);
} }
...@@ -4,7 +4,7 @@ import android.content.Context; ...@@ -4,7 +4,7 @@ import android.content.Context;
public class WdMain { public class WdMain {
// 用户申请sdk后获得的认证码,调用sdk接口时需传入 // 用户申请sdk后获得的认证码,调用sdk接口时需传入
private String mAccessKey; private String mApiKey;
//生成的唯一id //生成的唯一id
private String mWdId; private String mWdId;
...@@ -13,7 +13,16 @@ public class WdMain { ...@@ -13,7 +13,16 @@ public class WdMain {
private Context mContext; private Context mContext;
//初始化方法, //初始化方法,
public static void init(Context context, String accessKey, WdIdCallback cb) { public static void init(Context context, String apiKey) {
//load native lib
System.loadLibrary("wdun");
//todo 监控传感器数据变化
//todo 监控手机信号强度变化
}
//获取wdId
public static void getWdId(WdCallback cb) {
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment