# JFAI-DEMO
**Repository Path**: TQHub/jfai-demo
## Basic Information
- **Project Name**: JFAI-DEMO
- **Description**: 引用pandalib的demo工程
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: develop
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-04-23
- **Last Updated**: 2025-08-13
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
### 引入方式:
1. 直接引用本地libs中aar包:
implementation files('libs/pandaLib-release9.aar')
2. 也可通过maven引入:
阿里云私有制品仓库拉取aar:implementation "com.jiff.genius:pandalib:1.2.0-SNAPSHOT"
请在 build.gradle 中设置仓库的访问凭证:
```
allprojects {
repositories {
maven {
url 'https://maven.aliyun.com/repository/public'
}
maven {
credentials {
username '636dc244368f47831055ea52'
password 'Xr54s5TopP8o'
}
// SNAPSHOT版本地址
url 'https://packages.aliyun.com/6808479fe3a71588779434b3/maven/2534445-snapshot-bpjgwe'
// 正式版本地址
url 'https://packages.aliyun.com/6808479fe3a71588779434b3/maven/2534445-release-1c8ifp'
}
}
}
```
## 所需权限
```
```
## 使用方式:
1. 添加三方sdk支持:
```
// okhttp
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'com.squareup.okio:okio:3.8.0' // 必需依赖库
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0' // 日志拦截器
implementation 'com.squareup.okhttp3:okhttp-sse:4.12.0'
// retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
// markdown支持
implementation "io.noties.markwon:core:4.6.2"
// 表格样式优化
implementation "io.noties.markwon:ext-tables:4.6.2"
// 生物验证
implementation "androidx.biometric:biometric:1.1.0"
implementation 'androidx.core:core-ktx:1.10.1'
// 0.6.2-SNAPSHOT 图片支持-新增
api "io.noties.markwon:image:4.6.2"
// 0.6.2-SNAPSHOT 语音识别微软
api 'com.microsoft.cognitiveservices.speech:client-sdk:1.42.0'
```
2. 初始化以及打开主页面
```
// 初始化
PandaAILibSDK.initialize( this)
// 设置路由跳转支持
HKPandaRouterUtils.pandaAIRouterListener = object : HKPandaRouterUtils.PandaAIRouterListener {
override fun goRoute(path: String?) {
// 跳转AI页面
Toast.makeText(baseContext, "跳转AI页面:" + path, Toast.LENGTH_SHORT).show()
}
}
// 打开页面 param1: member_id param2: account_id
val primaryFragment = PrimaryFragment.newInstance("19863980", "PDU00000001")
supportFragmentManager.beginTransaction().add(R.id.container, primaryFragment).commit()
```