0.2.5 • Published 7 months ago
sjzt-cloud-device-plugin v0.2.5
sjzt-cloud-device-plugin
世纪智图 通用远程设备管理 目前包含功能
- 设备初始化检测及首屏
- 应用更新
- 应用重启
- 设备重启
- 设备快照
- 获取设备信息
- 设备网络检测
- 设备网络管理
- WIFI设置自动开启
example 源码在 gitee 目录内的 example
Installation
step-1. Android文件配置
android\app\src\main\java\com\你的包名\MainApplication.java
- 头部插入
import org.xutils.x;
- 在
onCreate
方法尾部插入x.Ext.init(this);
- 头部插入
android\app\build.gradle
- 在
dependencies
内尾部插入implementation('org.xutils:xutils:3.9.0')
- 在
android\build.gradle
- 插入以下内容
allprojects {
repositories {
maven {
name 'maven-snapshot'
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
}
maven {
url 'https://maven.aliyun.com/repository/public/'
}
maven {
url 'https://maven.aliyun.com/repository/central'
}
google()
mavenCentral()
jcenter()
mavenLocal()
}
}
configurations.all {
resolutionStrategy {
force 'androidx.core:core-ktx:1.6.0'
}
}
EXPO Installation
step-1. EXPO预构建
expo prebuild
step-2. 修改Android配置文件
- 修改
android/app/build.gradle:116
处的namespace
包名 - 修改
android/app/src/release/java/com/xx/ReactNativeFlipper.java
的package
包名如果包名和
xxx/android/app/src/main/AndroidManifest.xml
的包名相同则不需要修改
step-3. 注册云管理依赖
expo install sjzt-cloud-device-plugin
👇👇👇 DEMO
import { NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator, NativeStackNavigationOptions } from '@react-navigation/native-stack'; import { StatusBar } from 'expo-status-bar'; import { Dimensions, StyleSheet, View } from 'react-native'; import { AppManage } from 'sjzt-cloud-device-plugin-test';
export default function Navigation() { const screenOptions: NativeStackNavigationOptions = { headerShown: false, presentation: 'transparentModal' } const Stack = createNativeStackNavigator(); return <Stack.Navigator initialRouteName={'HOME'} screenOptions={screenOptions}
>
<Stack.Screen key={`HOME`} name={`HOME`}></Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
}
const styles = StyleSheet.create({ container: { width: Dimensions.get('screen').width, height: Dimensions.get('screen').height, flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, });
ok.
## API
| Method | Return Type |
| --------------------------------- | ----------- |
| [getDeviceInfo()](#getdeviceinfo) | `deviceInfoProps` |
## TroubleShot
遇到问题提 Issue@贾静豪
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
MIT
---
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
## Versions
- 0.2.5
- 优化获取设备信息时请求超时断网拦截
- 0.2.4
- 优化获取设备信息时的请求超时处理
- 0.2.2
- 增加设备远程快照
- 增加设备远程更新
- 0.2.1
- 优化未初始化适配问题
- 新增当wifi关闭时自动开启
- 0.2.0
- 增加网络状态检测
- 增加网络管理
- 0.1.3
- 优化initLock参数的控制只限于视图,只要使用此依赖就必须需要请求设备初始化状态。
- 0.1.2
- 增加initLock参数,实现对未初始化全屏的选择可有可无。
- 0.1.1
- 增加对设备检测是否已初始化,未初始化则全屏弹出未初始化屏幕。
- 0.1.0
- 首次上传。