https://github.com/fluttify-project/amap_track_fluttify
高德地图 猎鹰组件 Flutter插件
https://github.com/fluttify-project/amap_track_fluttify
Last synced: 3 months ago
JSON representation
高德地图 猎鹰组件 Flutter插件
- Host: GitHub
- URL: https://github.com/fluttify-project/amap_track_fluttify
- Owner: fluttify-project
- Created: 2020-09-14T03:23:59.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-18T01:01:55.000Z (almost 5 years ago)
- Last Synced: 2025-02-15T11:38:11.619Z (4 months ago)
- Size: 31.3 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# 高德地图 猎鹰组件 Flutter插件
[demo apk下载](https://github.com/fluttify-project/fluttify-project/raw/master/resources/amap_track_fluttify/%E7%8C%8E%E9%B9%B0-2020-09-14.apk)
**猎鹰组件为付费插件,有意请联系qq 382146139**
**猎鹰组件为付费插件,有意请联系qq 382146139**
**猎鹰组件为付费插件,有意请联系qq 382146139**# Fluttify系列插件
| 名称 | 描述 | 仓库 |
|:-----:|:-----:|:-----:|
| [高德地图](https://github.com/fluttify-project/amap_map_fluttify) | 高德地图地图组件, 提供地图控件 | [](https://pub.Flutter-io.cn/packages/amap_map_fluttify) |
| [高德定位](https://github.com/fluttify-project/amap_location_fluttify) | 高德地图定位组件, 提供独立的定位功能 | [](https://pub.Flutter-io.cn/packages/amap_location_fluttify) |
| [高德搜索](https://github.com/fluttify-project/amap_search_fluttify) | 高德地图搜索组件, 提供poi搜索等功能 | [](https://pub.Flutter-io.cn/packages/amap_search_fluttify) |
| [高德猎鹰](https://github.com/fluttify-project/amap_track_fluttify) | 高德地图猎鹰组件, 提供实时定位采集功能 | [](https://pub.Flutter-io.cn/packages/amap_track_fluttify) |
| [百度地图](https://github.com/fluttify-project/bmap_map_fluttify) | 百度地图, 包含了地图控件, 定位以及搜索poi等功能 | [](https://pub.Flutter-io.cn/packages/bmap_map_fluttify) |
| [百度人脸识别](https://github.com/fluttify-project/baidu_face_flutter) | 百度人脸识别, 提供活体检测等功能 | [](https://pub.Flutter-io.cn/packages/baidu_face_flutter) |
| [网易直播](https://github.com/fluttify-project/netease_live_fluttify) | 网易直播推流组件 | [](https://pub.Flutter-io.cn/packages/netease_live_fluttify) |
| [网易云信](https://github.com/fluttify-project/nim_fluttify) | 网易云信 IM组件 | [](https://pub.Flutter-io.cn/packages/nim_fluttify) |
| [腾讯直播](https://github.com/fluttify-project/tencent_live_fluttify) | 腾讯直播, 包含推流组件和播放组件 | [](https://pub.Flutter-io.cn/packages/tencent_live_fluttify) |
| [腾讯IM](https://github.com/fluttify-project/tim_fluttify) | 腾讯IM组件 | [](https://pub.Flutter-io.cn/packages/tim_fluttify) |
| [腾讯地图](https://github.com/fluttify-project/tmap_map_fluttify) | 腾讯地图组件 | [](https://pub.Flutter-io.cn/packages/tmap_map_fluttify) |
| [讯飞语音合成](https://github.com/fluttify-project/xftts_fluttify) | 腾讯语言合成组件, 提供文字转语言功能 | [](https://pub.flutter-io.cn/packages/xftts_fluttify) |
| [极光统计](https://github.com/fluttify-project/janalytics_fluttify) | 极光统计组件, 提供异常上报等功能 | [](https://pub.flutter-io.cn/packages/janalytics_fluttify) |
| [阿里云RTC](https://github.com/fluttify-project/ali_rtc_fluttify) | 阿里云实时音视频 | [](https://pub.flutter-io.cn/packages/ali_rtc_fluttify) |
| [环信](https://github.com/fluttify-project/easemob_im_fluttify) | 环信IM | [](https://pub.flutter-io.cn/packages/easemob_im_fluttify) |
| [未完待续...](https://github.com/fluttify-project) | 如有其它需求, 请联系qq 382146139 |  |## 依赖
```yaml
dependencies:
flutter:
sdk: flutter
amap_track_fluttify: ^x.x.x
```## 配置
### Android
1. 在`AndroidManifest.xml`的``标签下配置从高德开发者后台申请的key.
```xml
```
2. 注意在app/build.gradle的android块中配置签名信息, 并在buildTypes块中指定签名信息, 否则将无法匹配到你在高德后台配置的key, 例如:
```groovy
android {
signingConfigs {
release {
keyAlias 'amap_track_demo'
keyPassword 'amap_track_demo'
storeFile file('../amap_track_demo.jks')
storePassword 'amap_track_demo'
}
}buildTypes {
debug {
signingConfig signingConfigs.release
}
profile {
signingConfig signingConfigs.release
}
release {
signingConfig signingConfigs.release
}
}
}
```
3. 由于猎鹰SDK直接包含了定位SDK的代码, 导致不能与定位SDK共存, 解决方案为:
1. 使用Android Studio打开android工程;
2. 找到amap_location_fluttify模块的`build.gradle`文件;
3. 74行, 修改`api 'com.amap.api:location:5.1.0'` 为 `compileOnly 'com.amap.api:location:5.1.0'`; 此处修改意为"只在编译期间可见定位SDK, 不包含在最终的apk中", 所以能解决猎鹰SDK和定位SDK的冲突.
4. **此处修改为临时改动, 当定位插件版本升级时, 会覆盖掉此处的修改, 所以当定位插件升级时, 要留意这里, 需要重新改动回`compileOnly`**;
4. 权限无需另外申明, 定位服务组件无需另外声明, 已在插件中引入;
5. 无需再处理混淆, 已在插件中配置混淆规则;### iOS
1. 与Android端不同, iOS端的初始化需要在`AmapTrack.instance.init`方法中传入, 具体参考[wiki](https://github.com/fluttify-project/amap_track_fluttify/wiki);
2. 定位需要声明权限, 在Info.plist中添加:
```xml
NSLocationWhenInUseUsageDescription
需要定位权限
NSLocationAlwaysUsageDescription
需要定位权限
NSLocationAlwaysAndWhenInUseUsageDescription
需要定位权限
```
3. 配置后台定位:
1. 左侧目录中选中工程名,开启 TARGETS->Capabilities->Background Modes;
2. 在 Background Modes中勾选 Location updates,如下图所示: ## 导入
```dart
import 'package:amap_track_fluttify/amap_track_fluttify.dart';
```## 使用
参考[wiki](https://github.com/fluttify-project/amap_track_fluttify/wiki).## 社区
| QQ群 |
| :----------: |
||
## 社区版与专业版
| 显示地图 | 社区版 | 专业版 |
|:-----:|:-----:|:-----:|
| 开启寻迹服务 | ✅ | ✅ |
| 开始收集上报轨迹数据 | ✅ | ✅ |
| 停止收集上报轨迹数据 | ✅ | ✅ |
| 停止寻迹服务 | ✅ | ✅ |
| 根据终端名称创建终端 | ✅ | ✅ |
| 根据终端名称查询终端信息 | ✅ | ✅ |
| 查询最后一次上报的位置 | ✅ | ✅ |
| 获得当前设置的轨迹id | ☑️ | ✅ |
| 创建轨迹 | ☑️ | ✅ |
| 查询终端行驶里程 | ☑️ | ✅ |
| 查询终端历史轨迹 | ☑️ | ✅ |
| 查询终端下属于某个轨迹的轨迹点 | ☑️ | ✅ |
| 配置定位采集周期和上报周期 | ☑️ | ✅ |
| 配置本地缓存大小 | ☑️ | ✅ |## LICENSE
> Copyright (C) 2020 yohom
>
> This program is free software: you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation, either version 3 of the License, or
> (at your option) any later version.
>
> This program is distributed in the hope that it will be useful,
> but WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> GNU General Public License for more details.
>
> You should have received a copy of the GNU General Public License
> along with this program. If not, see .