Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-fluwx
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
clx-fluwx
Commits
a40a414e
提交
a40a414e
authored
4月 23, 2023
作者:
JarvanMo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Android load configurations from yaml.
上级
96cb5439
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
221 行增加
和
98 行删除
+221
-98
build.gradle
android/build.gradle
+36
-6
build.gradle.kts.bak
android/build.gradle.kts.bak
+56
-0
AndroidManifest.xml
android/src/main/AndroidManifest.xml
+14
-0
FluwxPlugin.kt
android/src/main/kotlin/com/jarvan/fluwx/FluwxPlugin.kt
+13
-11
FluwxRequestHandler.kt
...n/kotlin/com/jarvan/fluwx/handlers/FluwxRequestHandler.kt
+25
-37
WXAPiHandler.kt
...src/main/kotlin/com/jarvan/fluwx/handlers/WXAPiHandler.kt
+6
-7
FluwxExtensions.kt
...src/main/kotlin/com/jarvan/fluwx/utils/FluwxExtensions.kt
+56
-0
FluwxWXEntryActivity.kt
...ain/kotlin/com/jarvan/fluwx/wxapi/FluwxWXEntryActivity.kt
+6
-24
AndroidManifest.xml
example/android/app/src/main/AndroidManifest.xml
+0
-12
pubspec.yaml
example/pubspec.yaml
+9
-1
没有找到文件。
android/build.gradle
浏览文件 @
a40a414e
import
org.yaml.snakeyaml.Yaml
group
'com.jarvan.fluwx'
version
'1.0-SNAPSHOT'
...
...
@@ -9,7 +11,8 @@ buildscript {
}
dependencies
{
classpath
'com.android.tools.build:gradle:7.3.0'
classpath
'com.android.tools.build:gradle:7.3.1'
classpath
"org.yaml:snakeyaml:2.0"
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
...
...
@@ -23,10 +26,9 @@ allprojects {
apply
plugin:
'com.android.library'
apply
plugin:
'kotlin-android'
android
{
namespace
"com.jarvan.fluwx"
compileSdk
Version
31
compileSdk
31
sourceSets
{
main
.
java
.
srcDirs
+=
'src/main/kotlin'
...
...
@@ -36,6 +38,7 @@ android {
defaultConfig
{
minSdkVersion
16
consumerProguardFiles
'consumer-proguard-rules.txt'
manifestPlaceholders
=
loadManifestPlaceholder
()
}
dependencies
{
...
...
@@ -53,10 +56,37 @@ android {
useJUnitPlatform
()
testLogging
{
events
"passed"
,
"skipped"
,
"failed"
,
"standardOut"
,
"standardError"
outputs
.
upToDateWhen
{
false
}
showStandardStreams
=
true
events
"passed"
,
"skipped"
,
"failed"
,
"standardOut"
,
"standardError"
outputs
.
upToDateWhen
{
false
}
showStandardStreams
=
true
}
}
}
}
Map
loadManifestPlaceholder
()
{
def
path
=
rootProject
.
projectDir
.
parent
+
File
.
separator
+
"pubspec.yaml"
InputStream
input
=
new
FileInputStream
(
new
File
(
path
))
Yaml
yaml
=
new
Yaml
()
Map
projectConfig
=
yaml
.
load
(
input
)
String
appId
=
""
String
interruptWxRequest
=
"true"
String
flutterActivity
=
""
Map
fluwx
=
(
Map
)
projectConfig
.
get
(
"fluwx"
)
if
(
fluwx
)
{
Map
android
=
(
Map
)
fluwx
.
get
(
"android"
)
if
(
android
)
{
def
iwr
=
android
.
get
(
"interrupt_wx_request"
)
if
(
iwr
)
{
interruptWxRequest
=
(
String
)
iwr
}
def
activity
=
android
.
get
(
"flutter_activity"
)
if
(
activity
)
{
flutterActivity
=
(
String
)
activity
}
}
}
return
[
"WeChatAppId"
:
appId
,
"InterruptWeChatRequestByFluwx"
:
interruptWxRequest
,
"FluwxFlutterActivity"
:
flutterActivity
]
}
android/build.gradle.kts.bak
0 → 100644
浏览文件 @
a40a414e
group = "com.jarvan.fluwx"
version = "1.0-SNAPSHOT"
plugins {
id("com.android.library")
kotlin("android")
}
allprojects {
repositories {
google()
mavenCentral()
}
}
android {
namespace = "com.jarvan.fluwx"
compileSdk = 31
sourceSets {
val main by getting
main.java.srcDirs("src/main/kotlin")
val test by getting
test.java.srcDirs("src/test/kotlin")
}
defaultConfig {
minSdk = 16
consumerProguardFile("consumer-proguard-rules.txt")
}
testOptions {
unitTests.all {
it.useJUnitPlatform()
it.testLogging {
events("passed", "skipped", "failed", "standardOut", "standardError")
showStandardStreams = true
it.outputs.upToDateWhen {
false
}
}
}
}
}
dependencies {
api("com.tencent.mm.opensdk:wechat-sdk-android:6.8.24")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
implementation("id.zelory:compressor:3.0.1")
implementation("com.squareup.okhttp3:okhttp:4.10.0")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("org.mockito:mockito-core:5.0.0")
}
android/src/main/AndroidManifest.xml
浏览文件 @
a40a414e
...
...
@@ -11,6 +11,19 @@
</queries>
<application>
<meta-data
android:name=
"WeChatAppId"
android:value=
"${WeChatAppId}"
/>
<meta-data
android:name=
"InterruptWeChatRequestByFluwx"
android:value=
"${InterruptWeChatRequestByFluwx}"
/>
<meta-data
android:name=
"FluwxFlutterActivity"
android:value=
"${FluwxFlutterActivity}"
/>
<activity
android:name=
".wxapi.FluwxWXEntryActivity"
android:exported=
"false"
...
...
@@ -25,6 +38,7 @@
android:targetActivity=
"com.jarvan.fluwx.wxapi.FluwxWXEntryActivity"
android:taskAffinity=
"${applicationId}"
android:theme=
"@style/DisablePreviewTheme"
/>
<activity-alias
android:name=
"${applicationId}.wxapi.WXPayEntryActivity"
android:exported=
"true"
...
...
android/src/main/kotlin/com/jarvan/fluwx/FluwxPlugin.kt
浏览文件 @
a40a414e
...
...
@@ -36,26 +36,23 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
private
var
context
:
Context
?
=
null
private
fun
handelIntent
(
intent
:
Intent
)
{
val
action
=
intent
.
action
val
dataString
=
intent
.
dataString
if
(
Intent
.
ACTION_VIEW
==
action
)
{
extMsg
=
dataString
intent
.
getStringExtra
(
FluwxRequestHandler
.
KEY_FLUWX_REQUEST_INFO_EXT_MSG
)
?.
let
{
extMsg
=
it
}
}
override
fun
onAttachedToEngine
(
@NonNull
flutterPluginBinding
:
FlutterPlugin
.
FlutterPluginBinding
)
{
override
fun
onAttachedToEngine
(
flutterPluginBinding
:
FlutterPlugin
.
FlutterPluginBinding
)
{
val
channel
=
MethodChannel
(
flutterPluginBinding
.
binaryMessenger
,
"com.jarvanmo/fluwx"
)
channel
.
setMethodCallHandler
(
this
)
fluwxChannel
=
channel
context
=
flutterPluginBinding
.
applicationContext
authHandler
=
FluwxAuthHandler
(
channel
)
shareHandler
=
FluwxShareHandlerEmbedding
(
flutterPluginBinding
.
flutterAssets
,
flutterPluginBinding
.
applicationContext
flutterPluginBinding
.
flutterAssets
,
flutterPluginBinding
.
applicationContext
)
}
override
fun
onMethodCall
(
@NonNull
call
:
MethodCall
,
@NonNull
result
:
Result
)
{
override
fun
onMethodCall
(
call
:
MethodCall
,
result
:
Result
)
{
callingChannel
=
fluwxChannel
when
{
call
.
method
==
"registerApp"
->
WXAPiHandler
.
registerApp
(
call
,
result
,
context
)
...
...
@@ -75,12 +72,13 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
call
.
method
==
"isWeChatInstalled"
->
WXAPiHandler
.
checkWeChatInstallation
(
result
)
call
.
method
==
"getExtMsg"
->
getExtMsg
(
result
)
call
.
method
==
"openWeChatCustomerServiceChat"
->
openWeChatCustomerServiceChat
(
call
,
result
call
,
result
)
call
.
method
==
"checkSupportOpenBusinessView"
->
WXAPiHandler
.
checkSupportOpenBusinessView
(
result
)
call
.
method
==
"openBusinessView"
->
openBusinessView
(
call
,
result
)
call
.
method
==
"openWeChatInvoice"
->
openWeChatInvoice
(
call
,
result
);
...
...
@@ -104,7 +102,9 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
request
.
timeStamp
=
System
.
currentTimeMillis
().
toString
()
request
.
nonceStr
=
System
.
currentTimeMillis
().
toString
()
request
.
signType
=
"SHA1"
request
.
cardSign
=
WXApiUtils
.
createSign
(
request
.
appId
,
request
.
nonceStr
,
request
.
timeStamp
,
request
.
cardType
)
request
.
cardSign
=
WXApiUtils
.
createSign
(
request
.
appId
,
request
.
nonceStr
,
request
.
timeStamp
,
request
.
cardType
)
val
done
=
WXAPiHandler
.
wxApi
?.
sendReq
(
request
)
result
.
success
(
done
)
}
...
...
@@ -122,11 +122,13 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
override
fun
onReattachedToActivityForConfigChanges
(
binding
:
ActivityPluginBinding
)
{
shareHandler
?.
permissionHandler
=
PermissionHandler
(
binding
.
activity
)
handelIntent
(
binding
.
activity
.
intent
)
FluwxRequestHandler
.
handleRequestInfoFromIntent
(
binding
.
activity
.
intent
)
}
override
fun
onAttachedToActivity
(
binding
:
ActivityPluginBinding
)
{
// WXAPiHandler.setContext(binding.activity.applicationContext)
handelIntent
(
binding
.
activity
.
intent
)
FluwxRequestHandler
.
handleRequestInfoFromIntent
(
binding
.
activity
.
intent
)
shareHandler
?.
permissionHandler
=
PermissionHandler
(
binding
.
activity
)
}
...
...
android/src/main/kotlin/com/jarvan/fluwx/handlers/FluwxRequestHandler.kt
浏览文件 @
a40a414e
...
...
@@ -16,6 +16,7 @@
package
com.jarvan.fluwx.handlers
import
android.app.Activity
import
android.content.ActivityNotFoundException
import
android.content.Context
import
android.content.Intent
import
android.content.pm.PackageManager
...
...
@@ -24,13 +25,15 @@ import android.os.Bundle
import
android.util.Log
import
androidx.core.content.ContextCompat.startActivity
import
com.jarvan.fluwx.FluwxPlugin
import
com.jarvan.fluwx.utils.KEY_FLUWX_REQUEST_INFO_BUNDLE
import
com.jarvan.fluwx.utils.KEY_FLUWX_REQUEST_INFO_EXT_MSG
import
com.jarvan.fluwx.utils.startFlutterActivity
import
com.tencent.mm.opensdk.modelbase.BaseReq
import
com.tencent.mm.opensdk.modelmsg.ShowMessageFromWX
import
java.security.cert.Extension
object
FluwxRequestHandler
{
private
const
val
KEY_FLUWX_REQUEST_INFO_BUNDLE
=
"KEY_FLUWX_REQUEST_INFO_BUNDLE"
var
customOnReqDelegate
:
((
baseReq
:
BaseReq
,
activity
:
Activity
)
->
Unit
)?
=
null
...
...
@@ -43,7 +46,8 @@ object FluwxRequestHandler {
}
}
private
fun
handleShowMessageFromWXBundle
(
bundle
:
Bundle
)
=
handleWXShowMessageFromWX
(
ShowMessageFromWX
.
Req
(
bundle
))
private
fun
handleShowMessageFromWXBundle
(
bundle
:
Bundle
)
=
handleWXShowMessageFromWX
(
ShowMessageFromWX
.
Req
(
bundle
))
private
fun
handleRequest
(
req
:
BaseReq
)
{
when
(
req
)
{
...
...
@@ -53,7 +57,7 @@ object FluwxRequestHandler {
private
fun
handleWXShowMessageFromWX
(
req
:
ShowMessageFromWX
.
Req
)
{
val
result
=
mapOf
(
"extMsg"
to
req
.
message
.
messageExt
"extMsg"
to
req
.
message
.
messageExt
)
FluwxPlugin
.
extMsg
=
req
.
message
.
messageExt
;
FluwxPlugin
.
callingChannel
?.
invokeMethod
(
"onWXShowMessageFromWX"
,
result
)
...
...
@@ -66,22 +70,21 @@ object FluwxRequestHandler {
// com.tencent.mm.opensdk.constants.ConstantsAPI.COMMAND_SHOWMESSAGE_FROM_WX = 4
if
(!
WXAPiHandler
.
coolBoot
)
{
handleRequest
(
baseReq
)
startSpecifiedActivity
(
defaultFlutterActivityAction
(
activity
),
activity
=
activity
)
activity
.
startFlutterActivity
(
)
}
else
{
when
(
baseReq
)
{
is
ShowMessageFromWX
.
Req
->
{
try
{
val
intent
=
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
"wechatextmsg://${activity.packageName}/?extmsg=${baseReq.message.messageExt}"
))
val
bundle
=
Bundle
()
baseReq
.
toBundle
(
bundle
)
intent
.
putExtra
(
KEY_FLUWX_REQUEST_INFO_BUNDLE
,
bundle
)
activity
.
startActivity
(
intent
)
activity
.
finish
()
WXAPiHandler
.
coolBoot
=
false
}
catch
(
e
:
Exception
)
{
Log
.
i
(
"fluwx"
,
"call scheme error:${e.toString()}"
)
}
activity
.
startFlutterActivity
(
wxRequestBundle
=
Bundle
().
apply
{
baseReq
.
toBundle
(
this
)
},
bundle
=
Bundle
().
apply
{
putString
(
KEY_FLUWX_REQUEST_INFO_EXT_MSG
,
baseReq
.
message
.
messageExt
)
})
WXAPiHandler
.
coolBoot
=
false
}
}
}
...
...
@@ -91,32 +94,18 @@ object FluwxRequestHandler {
fun
onReq
(
baseReq
:
BaseReq
,
activity
:
Activity
)
{
try
{
val
packageManager
=
activity
.
packageManager
val
appInfo
=
packageManager
.
getApplicationInfo
(
activity
.
packageName
,
PackageManager
.
GET_META_DATA
)
val
defaultHandle
=
appInfo
.
metaData
.
getBoolean
(
"handleWeChatRequestByFluwx"
,
true
)
val
appInfo
=
packageManager
.
getApplicationInfo
(
activity
.
packageName
,
PackageManager
.
GET_META_DATA
)
val
defaultHandle
=
appInfo
.
metaData
.
getBoolean
(
"InterruptWeChatRequestByFluwx"
,
true
)
if
(
defaultHandle
)
{
defaultOnReqDelegate
(
baseReq
,
activity
)
}
else
{
customOnReqDelegate
?.
invoke
(
baseReq
,
activity
)
}
}
catch
(
e
:
Exception
)
{
Log
.
i
(
"Fluwx"
,
"can't load meta-data handleWeChatRequestByFluwx"
)
}
}
private
fun
startSpecifiedActivity
(
action
:
String
,
activity
:
Activity
,
bundle
:
Bundle
?
=
null
,
bundleKey
:
String
?
=
null
)
{
Intent
(
action
).
run
{
bundleKey
?.
let
{
putExtra
(
bundleKey
,
bundle
)
}
addFlags
(
Intent
.
FLAG_ACTIVITY_REORDER_TO_FRONT
)
activity
.
packageManager
?.
let
{
resolveActivity
(
it
)
?.
also
{
activity
.
startActivity
(
this
)
activity
.
finish
()
}
}
Log
.
i
(
"Fluwx"
,
"can't load meta-data InterruptWeChatRequestByFluwx"
)
}
}
private
fun
defaultFlutterActivityAction
(
context
:
Context
):
String
=
"${context.packageName}.FlutterActivity"
}
\ No newline at end of file
android/src/main/kotlin/com/jarvan/fluwx/handlers/WXAPiHandler.kt
浏览文件 @
a40a414e
...
...
@@ -92,7 +92,7 @@ object WXAPiHandler : ILog {
wxApi
?.
isWXAppInstalled
!=
true
->
{
result
.
error
(
"WeChat Not Installed"
,
"Please install the WeChat first"
,
null
)
}
wxApi
?.
wxAppSupportAPI
?:
0
<
Build
.
OPEN_BUSINESS_VIEW_SDK_INT
->
{
(
wxApi
?.
wxAppSupportAPI
?:
0
)
<
Build
.
OPEN_BUSINESS_VIEW_SDK_INT
->
{
result
.
error
(
"WeChat Not Supported"
,
"Please upgrade the WeChat version"
,
null
)
}
else
->
{
...
...
@@ -108,20 +108,19 @@ object WXAPiHandler : ILog {
}
fun
startLog
(
call
:
MethodCall
,
result
:
MethodChannel
.
Result
)
{
wxApi
?.
setLogImpl
(
this
)
;
result
.
success
(
true
)
;
wxApi
?.
setLogImpl
(
this
)
result
.
success
(
true
)
}
fun
stopLog
(
call
:
MethodCall
,
result
:
MethodChannel
.
Result
)
{
wxApi
?.
setLogImpl
(
null
);
result
.
success
(
true
);
wxApi
?.
setLogImpl
(
null
)
result
.
success
(
true
)
}
override
fun
d
(
p0
:
String
?,
p1
:
String
?)
{
when
{
p1
!=
null
->
{
Log
.
d
(
p0
,
p1
)
;
Log
.
d
(
p0
,
p1
)
}
}
}
...
...
android/src/main/kotlin/com/jarvan/fluwx/utils/FluwxExtensions.kt
0 → 100644
浏览文件 @
a40a414e
package
com.jarvan.fluwx.utils
import
android.app.Activity
import
android.content.ActivityNotFoundException
import
android.content.Context
import
android.content.Intent
import
android.content.pm.PackageManager
import
android.os.Bundle
import
android.util.Log
internal
const
val
KEY_FLUWX_REQUEST_INFO_EXT_MSG
=
"KEY_FLUWX_REQUEST_INFO_EXT_MSG"
internal
const
val
KEY_FLUWX_REQUEST_INFO_BUNDLE
=
"KEY_FLUWX_REQUEST_INFO_BUNDLE"
internal
fun
Activity
.
startFlutterActivity
(
wxRequestBundle
:
Bundle
?
=
null
,
bundle
:
Bundle
?
=
null
,
)
{
flutterActivityIntent
()
?.
also
{
intent
->
intent
.
addFluwxExtras
()
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
)
bundle
?.
let
{
intent
.
putExtras
(
it
)
}
wxRequestBundle
?.
let
{
intent
.
putExtra
(
KEY_FLUWX_REQUEST_INFO_BUNDLE
,
it
)
}
try
{
startActivity
(
intent
)
}
catch
(
e
:
ActivityNotFoundException
)
{
Log
.
w
(
"fluwx"
,
"Can not start activity for Intent: $intent"
)
}
finally
{
finish
()
}
}
}
internal
fun
Context
.
flutterActivityIntent
():
Intent
?
{
val
appInfo
=
packageManager
.
getApplicationInfo
(
packageName
,
PackageManager
.
GET_META_DATA
)
val
flutterActivity
=
appInfo
.
metaData
.
getString
(
"FluwxFlutterActivity"
,
""
)
return
if
(
flutterActivity
.
isBlank
())
{
packageManager
.
getLaunchIntentForPackage
(
packageName
)
}
else
{
Intent
().
also
{
it
.
setClassName
(
this
,
"${packageName}.$flutterActivity"
)
}
}
}
internal
fun
Intent
.
addFluwxExtras
()
{
putExtra
(
"fluwx_payload_from_fluwx"
,
true
)
}
\ No newline at end of file
android/src/main/kotlin/com/jarvan/fluwx/wxapi/FluwxWXEntryActivity.kt
浏览文件 @
a40a414e
...
...
@@ -22,6 +22,8 @@ import android.os.Bundle
import
com.jarvan.fluwx.handlers.FluwxResponseHandler
import
com.jarvan.fluwx.handlers.FluwxRequestHandler
import
com.jarvan.fluwx.handlers.WXAPiHandler
import
com.jarvan.fluwx.utils.flutterActivityIntent
import
com.jarvan.fluwx.utils.startFlutterActivity
import
com.tencent.mm.opensdk.modelbase.BaseReq
import
com.tencent.mm.opensdk.modelbase.BaseResp
import
com.tencent.mm.opensdk.openapi.IWXAPIEventHandler
...
...
@@ -38,19 +40,18 @@ open class FluwxWXEntryActivity : Activity(), IWXAPIEventHandler {
try
{
if
(!
WXAPiHandler
.
wxApiRegistered
)
{
val
appInfo
=
packageManager
.
getApplicationInfo
(
packageName
,
PackageManager
.
GET_META_DATA
)
val
wechatAppId
=
appInfo
.
metaData
.
getString
(
"
w
eChatAppId"
)
val
wechatAppId
=
appInfo
.
metaData
.
getString
(
"
W
eChatAppId"
)
if
(
wechatAppId
!=
null
)
{
WXAPiHandler
.
setupWxApi
(
wechatAppId
,
this
)
WXAPiHandler
.
coolBoot
=
true
}
else
{
Log
.
e
(
"fluwx"
,
"can't load meta-data weChatAppId"
)
Log
.
w
(
"fluwx"
,
"can't load meta-data weChatAppId"
)
}
}
WXAPiHandler
.
wxApi
?.
handleIntent
(
intent
,
this
)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
startSpecifiedActivity
(
defaultFlutterActivityAction
())
finish
()
this
.
startFlutterActivity
()
}
}
...
...
@@ -63,8 +64,7 @@ open class FluwxWXEntryActivity : Activity(), IWXAPIEventHandler {
WXAPiHandler
.
wxApi
?.
handleIntent
(
intent
,
this
)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
startSpecifiedActivity
(
defaultFlutterActivityAction
())
finish
()
this
.
startFlutterActivity
()
}
}
...
...
@@ -80,21 +80,4 @@ open class FluwxWXEntryActivity : Activity(), IWXAPIEventHandler {
FluwxResponseHandler
.
handleResponse
(
resp
)
finish
()
}
private
fun
startSpecifiedActivity
(
action
:
String
,
bundle
:
Bundle
?
=
null
,
bundleKey
:
String
?
=
null
)
{
Intent
(
action
).
run
{
bundleKey
?.
let
{
putExtra
(
bundleKey
,
bundle
)
}
addFlags
(
Intent
.
FLAG_ACTIVITY_REORDER_TO_FRONT
)
packageManager
?.
let
{
resolveActivity
(
packageManager
)
?.
also
{
startActivity
(
this
)
finish
()
}
}
}
}
private
fun
defaultFlutterActivityAction
():
String
=
"$packageName.FlutterActivity"
}
\ No newline at end of file
example/android/app/src/main/AndroidManifest.xml
浏览文件 @
a40a414e
...
...
@@ -36,18 +36,6 @@
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
<intent-filter>
<action
android:name=
"${applicationId}.FlutterActivity"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
</intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.VIEW"
/>
<category
android:name=
"android.intent.category.DEFAULT"
/>
<data
android:host=
"${applicationId}"
android:path=
"/"
android:scheme=
"wechatextmsg"
/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
...
...
example/pubspec.yaml
浏览文件 @
a40a414e
...
...
@@ -55,7 +55,7 @@ flutter:
# To add assets to your application, add an assets section, like this:
assets
:
-
images/logo.png
-
images/logo.png
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
...
...
@@ -82,3 +82,11 @@ flutter:
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
fluwx
:
app_id
:
123456
android
:
interrupt_wx_request
:
true
flutter_activity
:
MainActivity
ios
:
uni_link
:
hello
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论