@greensoul/expo-native-wechat 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -0
- package/UPSTREAM.md +49 -0
- package/android/build/.transforms/8eaaf091b6b9d168861055549f685577/results.bin +1 -0
- package/android/build/.transforms/8eaaf091b6b9d168861055549f685577/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/expo/modules/nativewechat/BuildConfig.java +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/greensoul-expo-native-wechat_debug.kotlin_module +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/expo/modules/nativewechat/BuildConfig.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +16 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/greensoul-expo-native-wechat_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/AppPureSignContractParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/BasicRequestParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$1$2$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$1$6$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$1$7$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$1$7$onCoverDownloaded$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$1$8$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$1$8$onCoverDownloaded$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$1$9$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$1$9$onCoverDownloaded$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$10.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$11.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$12.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$13.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$14.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$15.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$16.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$17.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$18.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$19.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$20.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$21.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$22.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$23.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$24.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$25.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$26.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$27.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$28.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$29.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$30.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$4.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$5.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$6.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$7.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$8.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$Function$9.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule$definition$lambda$16$$inlined$FunctionWithoutArgs$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatUtils$DownloadBitmapCallback.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatUtils$downloadFileAsBitmap$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ExpoNativeWechatUtils.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/LaunchMiniprogramParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/NativeWechatRespDataHelper.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/OpenBusinessViewParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/OpenCustomerServiceParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/RegisterAppParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/RequestMerchantTransferParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/RequestPaymentParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/RequestSubscribeMsgParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/SendAuthRequestParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ShareImageParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ShareMiniProgramParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ShareTextParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ShareVideoParams.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/expo/modules/nativewechat/ShareWebpageParams.class +0 -0
- package/android/build.gradle +118 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/expo/modules/nativewechat/ExpoNativeWechatModule.kt +509 -0
- package/android/src/main/java/expo/modules/nativewechat/ExpoNativeWechatModuleParams.kt +229 -0
- package/android/src/main/java/expo/modules/nativewechat/ExpoNativeWechatUtils.kt +64 -0
- package/android/src/main/java/expo/modules/nativewechat/NativeWechatRespDataHelper.kt +64 -0
- package/app.plugin.js +173 -0
- package/build/hooks.d.ts +2 -0
- package/build/hooks.d.ts.map +1 -0
- package/build/hooks.js +12 -0
- package/build/hooks.js.map +1 -0
- package/build/index.d.ts +102 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +247 -0
- package/build/index.js.map +1 -0
- package/build/module.d.ts +3 -0
- package/build/module.d.ts.map +1 -0
- package/build/module.js +5 -0
- package/build/module.js.map +1 -0
- package/build/notification.d.ts +12 -0
- package/build/notification.d.ts.map +1 -0
- package/build/notification.js +33 -0
- package/build/notification.js.map +1 -0
- package/build/typing.d.ts +41 -0
- package/build/typing.d.ts.map +1 -0
- package/build/typing.js +2 -0
- package/build/typing.js.map +1 -0
- package/build/utils.d.ts +4 -0
- package/build/utils.d.ts.map +1 -0
- package/build/utils.js +9 -0
- package/build/utils.js.map +1 -0
- package/expo-module.config.json +10 -0
- package/ios/ExpoNativeWechat-Bridging-Header.h +10 -0
- package/ios/ExpoNativeWechat.h +19 -0
- package/ios/ExpoNativeWechat.podspec +28 -0
- package/ios/ExpoNativeWechatLogger.h +17 -0
- package/ios/ExpoNativeWechatLogger.m +26 -0
- package/ios/ExpoNativeWechatModule.swift +392 -0
- package/ios/ExpoNativeWechatModuleParams.swift +230 -0
- package/ios/ExpoWechatDelegate.swift +30 -0
- package/ios/ExpoWechatUtils.swift +60 -0
- package/ios/RespDataHelper.h +8 -0
- package/ios/RespDataHelper.m +54 -0
- package/ios/ResponseHandler.h +15 -0
- package/ios/ResponseHandler.m +22 -0
- package/package.json +60 -0
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
package expo.modules.nativewechat
|
|
2
|
+
|
|
3
|
+
import android.content.BroadcastReceiver
|
|
4
|
+
import android.content.Context
|
|
5
|
+
import android.content.Intent
|
|
6
|
+
import android.content.IntentFilter
|
|
7
|
+
import android.graphics.Bitmap
|
|
8
|
+
import android.os.Build
|
|
9
|
+
import androidx.annotation.RequiresApi
|
|
10
|
+
import androidx.core.os.bundleOf
|
|
11
|
+
import com.tencent.mm.opensdk.modelbase.BaseReq
|
|
12
|
+
import com.tencent.mm.opensdk.modelbase.BaseResp
|
|
13
|
+
import com.tencent.mm.opensdk.modelbiz.SubscribeMessage
|
|
14
|
+
import com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram
|
|
15
|
+
import com.tencent.mm.opensdk.modelbiz.WXOpenBusinessWebview
|
|
16
|
+
import com.tencent.mm.opensdk.modelbiz.WXOpenCustomerServiceChat
|
|
17
|
+
import com.tencent.mm.opensdk.modelbiz.WXOpenBusinessView
|
|
18
|
+
import com.tencent.mm.opensdk.modelmsg.SendAuth
|
|
19
|
+
import com.tencent.mm.opensdk.modelmsg.SendMessageToWX
|
|
20
|
+
import com.tencent.mm.opensdk.modelmsg.WXImageObject
|
|
21
|
+
import com.tencent.mm.opensdk.modelmsg.WXMediaMessage
|
|
22
|
+
import com.tencent.mm.opensdk.modelmsg.WXMiniProgramObject
|
|
23
|
+
import com.tencent.mm.opensdk.modelmsg.WXTextObject
|
|
24
|
+
import com.tencent.mm.opensdk.modelmsg.WXVideoObject
|
|
25
|
+
import com.tencent.mm.opensdk.modelmsg.WXWebpageObject
|
|
26
|
+
import com.tencent.mm.opensdk.modelpay.PayReq
|
|
27
|
+
import com.tencent.mm.opensdk.openapi.IWXAPI
|
|
28
|
+
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler
|
|
29
|
+
import com.tencent.mm.opensdk.openapi.WXAPIFactory
|
|
30
|
+
import expo.modules.kotlin.modules.Module
|
|
31
|
+
import expo.modules.kotlin.modules.ModuleDefinition
|
|
32
|
+
import expo.modules.nativewechat.ExpoNativeWechatUtils.DownloadBitmapCallback
|
|
33
|
+
import okhttp3.Call
|
|
34
|
+
import java.io.IOException
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class ExpoNativeWechatModule : Module(), IWXAPIEventHandler {
|
|
38
|
+
private var appid: String? = null
|
|
39
|
+
private var registered = false
|
|
40
|
+
private var wxApi: IWXAPI? = null
|
|
41
|
+
private val REDIRECT_INTENT_ACTION = "com.hector.nativewechat.ACTION_REDIRECT_INTENT"
|
|
42
|
+
private val reactContext
|
|
43
|
+
get() = requireNotNull(appContext.reactContext)
|
|
44
|
+
|
|
45
|
+
@RequiresApi(Build.VERSION_CODES.O)
|
|
46
|
+
override fun definition() = ModuleDefinition {
|
|
47
|
+
Name("ExpoNativeWechat")
|
|
48
|
+
|
|
49
|
+
Function("getConstants") {
|
|
50
|
+
return@Function bundleOf(
|
|
51
|
+
"WXSceneSession" to SendMessageToWX.Req.WXSceneSession,
|
|
52
|
+
"WXSceneTimeline" to SendMessageToWX.Req.WXSceneTimeline,
|
|
53
|
+
"WXSceneFavorite" to SendMessageToWX.Req.WXSceneFavorite,
|
|
54
|
+
"WXMiniProgramTypeRelease" to WXLaunchMiniProgram.Req.MINIPTOGRAM_TYPE_RELEASE,
|
|
55
|
+
"WXMiniProgramTypeTest" to WXLaunchMiniProgram.Req.MINIPROGRAM_TYPE_TEST,
|
|
56
|
+
"WXMiniProgramTypePreview" to WXLaunchMiniProgram.Req.MINIPROGRAM_TYPE_PREVIEW
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
Events("ResponseData", "ResponseFromNotification")
|
|
61
|
+
|
|
62
|
+
Function("registerApp") { params: RegisterAppParams ->
|
|
63
|
+
appid = params.appid
|
|
64
|
+
registered = true
|
|
65
|
+
|
|
66
|
+
wxApi = WXAPIFactory.createWXAPI(reactContext, appid, true);
|
|
67
|
+
|
|
68
|
+
val success = wxApi?.registerApp(appid)
|
|
69
|
+
|
|
70
|
+
appContext.reactContext?.registerReceiver(object : BroadcastReceiver() {
|
|
71
|
+
override fun onReceive(context: Context, intent: Intent) {
|
|
72
|
+
handleIntent(intent.extras!!["intent"] as Intent?)
|
|
73
|
+
}
|
|
74
|
+
}, IntentFilter(REDIRECT_INTENT_ACTION), Context.RECEIVER_EXPORTED);
|
|
75
|
+
|
|
76
|
+
this@ExpoNativeWechatModule.sendEvent(
|
|
77
|
+
"ResponseData", bundleOf(
|
|
78
|
+
"success" to success,
|
|
79
|
+
"id" to params.id
|
|
80
|
+
)
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
Function("isWechatInstalled") { params: BasicRequestParams ->
|
|
85
|
+
val installed = wxApi?.isWXAppInstalled()
|
|
86
|
+
|
|
87
|
+
this@ExpoNativeWechatModule.sendEvent(
|
|
88
|
+
"ResponseData", bundleOf(
|
|
89
|
+
"success" to installed,
|
|
90
|
+
"id" to params.id
|
|
91
|
+
)
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
Function("sendAuthRequest") { params: SendAuthRequestParams ->
|
|
96
|
+
var req = SendAuth.Req()
|
|
97
|
+
|
|
98
|
+
req.scope = params.scope
|
|
99
|
+
req.state = req.state
|
|
100
|
+
|
|
101
|
+
sendEvent(
|
|
102
|
+
"ResponseData", bundleOf(
|
|
103
|
+
"id" to params.id,
|
|
104
|
+
"success" to wxApi?.sendReq(req)
|
|
105
|
+
)
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
Function("shareText") { params: ShareTextParams ->
|
|
110
|
+
val text = params.text
|
|
111
|
+
val scene = params.scene
|
|
112
|
+
|
|
113
|
+
val textObj = WXTextObject()
|
|
114
|
+
textObj.text = text
|
|
115
|
+
|
|
116
|
+
val msg = WXMediaMessage()
|
|
117
|
+
msg.mediaObject = textObj
|
|
118
|
+
msg.description = text
|
|
119
|
+
|
|
120
|
+
val req = SendMessageToWX.Req()
|
|
121
|
+
req.message = msg
|
|
122
|
+
req.scene = scene
|
|
123
|
+
|
|
124
|
+
sendEvent(
|
|
125
|
+
"ResponseData", bundleOf(
|
|
126
|
+
"id" to params.id,
|
|
127
|
+
"success" to wxApi?.sendReq(req)
|
|
128
|
+
)
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
Function("shareImage") { params: ShareImageParams ->
|
|
133
|
+
val src = params.src
|
|
134
|
+
val scene = params.scene
|
|
135
|
+
|
|
136
|
+
ExpoNativeWechatUtils.downloadFileAsBitmap(src, object : DownloadBitmapCallback {
|
|
137
|
+
override fun onFailure(call: Call, e: IOException) {
|
|
138
|
+
this@ExpoNativeWechatModule.sendEvent(
|
|
139
|
+
"ResponseData", bundleOf(
|
|
140
|
+
"id" to params.id,
|
|
141
|
+
"success" to false,
|
|
142
|
+
"message" to e.localizedMessage
|
|
143
|
+
)
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
override fun onResponse(bitmap: Bitmap) {
|
|
148
|
+
val imgObj = WXImageObject(bitmap)
|
|
149
|
+
val msg = WXMediaMessage()
|
|
150
|
+
msg.mediaObject = imgObj
|
|
151
|
+
|
|
152
|
+
bitmap?.let {
|
|
153
|
+
msg.thumbData = ExpoNativeWechatUtils.bmpToByteArray(bitmap, 32, true)
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
val req = SendMessageToWX.Req()
|
|
157
|
+
req.message = msg
|
|
158
|
+
req.scene = scene
|
|
159
|
+
|
|
160
|
+
sendEvent(
|
|
161
|
+
"ResponseData", bundleOf(
|
|
162
|
+
"id" to params.id,
|
|
163
|
+
"success" to wxApi?.sendReq(req)
|
|
164
|
+
)
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
}
|
|
168
|
+
})
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
Function("shareWebpage") { params: ShareWebpageParams ->
|
|
172
|
+
val webpageUrl = params.webpageUrl
|
|
173
|
+
val title = params.title
|
|
174
|
+
val description = params.description
|
|
175
|
+
val coverUrl = params.coverUrl
|
|
176
|
+
val scene = params.scene
|
|
177
|
+
|
|
178
|
+
val webpageObj = WXWebpageObject()
|
|
179
|
+
webpageObj.webpageUrl = webpageUrl
|
|
180
|
+
|
|
181
|
+
val msg = WXMediaMessage(webpageObj)
|
|
182
|
+
msg.title = title
|
|
183
|
+
msg.description = description
|
|
184
|
+
|
|
185
|
+
val onCoverDownloaded: (Bitmap?) -> Unit = { bitmap ->
|
|
186
|
+
bitmap?.let {
|
|
187
|
+
msg.thumbData = ExpoNativeWechatUtils.bmpToByteArray(bitmap, 32, true)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
val req = SendMessageToWX.Req()
|
|
191
|
+
req.message = msg
|
|
192
|
+
req.scene = scene
|
|
193
|
+
|
|
194
|
+
sendEvent(
|
|
195
|
+
"ResponseData", bundleOf(
|
|
196
|
+
"id" to params.id,
|
|
197
|
+
"success" to wxApi?.sendReq(req)
|
|
198
|
+
)
|
|
199
|
+
)
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if (!coverUrl.isNullOrEmpty()) {
|
|
203
|
+
ExpoNativeWechatUtils.downloadFileAsBitmap(
|
|
204
|
+
coverUrl,
|
|
205
|
+
object : DownloadBitmapCallback {
|
|
206
|
+
override fun onFailure(call: Call, e: IOException) {
|
|
207
|
+
this@ExpoNativeWechatModule.sendEvent(
|
|
208
|
+
"ResponseData", bundleOf(
|
|
209
|
+
"id" to params.id,
|
|
210
|
+
"success" to false,
|
|
211
|
+
"message" to e.localizedMessage
|
|
212
|
+
)
|
|
213
|
+
)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
override fun onResponse(bitmap: Bitmap) {
|
|
217
|
+
onCoverDownloaded(bitmap)
|
|
218
|
+
}
|
|
219
|
+
})
|
|
220
|
+
} else {
|
|
221
|
+
onCoverDownloaded(null)
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
Function("shareVideo") { params: ShareVideoParams ->
|
|
226
|
+
val videoUrl = params.videoUrl
|
|
227
|
+
val videoLowBandUrl = params.videoLowBandUrl
|
|
228
|
+
val title = params.title
|
|
229
|
+
val description = params.description
|
|
230
|
+
val coverUrl = params.coverUrl
|
|
231
|
+
val scene = params.scene
|
|
232
|
+
|
|
233
|
+
val video = WXVideoObject()
|
|
234
|
+
video.videoUrl = videoUrl
|
|
235
|
+
|
|
236
|
+
if (videoLowBandUrl != null) video.videoLowBandUrl = videoLowBandUrl
|
|
237
|
+
|
|
238
|
+
val msg = WXMediaMessage(video)
|
|
239
|
+
msg.title = title
|
|
240
|
+
msg.description = description
|
|
241
|
+
|
|
242
|
+
val onCoverDownloaded: (Bitmap?) -> Unit = { bitmap ->
|
|
243
|
+
bitmap?.let {
|
|
244
|
+
msg.thumbData = ExpoNativeWechatUtils.bmpToByteArray(bitmap, 32, true)
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
val req = SendMessageToWX.Req()
|
|
248
|
+
req.message = msg
|
|
249
|
+
req.scene = scene
|
|
250
|
+
|
|
251
|
+
sendEvent(
|
|
252
|
+
"ResponseData", bundleOf(
|
|
253
|
+
"id" to params.id,
|
|
254
|
+
"success" to wxApi?.sendReq(req)
|
|
255
|
+
)
|
|
256
|
+
)
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (!coverUrl.isNullOrEmpty()) {
|
|
260
|
+
ExpoNativeWechatUtils.downloadFileAsBitmap(
|
|
261
|
+
coverUrl,
|
|
262
|
+
object : DownloadBitmapCallback {
|
|
263
|
+
override fun onFailure(call: Call, e: IOException) {
|
|
264
|
+
this@ExpoNativeWechatModule.sendEvent(
|
|
265
|
+
"ResponseData", bundleOf(
|
|
266
|
+
"id" to params.id,
|
|
267
|
+
"success" to false,
|
|
268
|
+
"message" to e.localizedMessage
|
|
269
|
+
)
|
|
270
|
+
)
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
override fun onResponse(bitmap: Bitmap) {
|
|
274
|
+
onCoverDownloaded(bitmap)
|
|
275
|
+
}
|
|
276
|
+
})
|
|
277
|
+
} else {
|
|
278
|
+
onCoverDownloaded(null)
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
Function("shareMiniProgram") { params: ShareMiniProgramParams ->
|
|
283
|
+
val webpageUrl = params.webpageUrl
|
|
284
|
+
val userName = params.userName
|
|
285
|
+
val path = params.path
|
|
286
|
+
val title = params.title
|
|
287
|
+
val description = params.description
|
|
288
|
+
val coverUrl = params.coverUrl
|
|
289
|
+
val withShareTicket = params.withShareTicket
|
|
290
|
+
val miniProgramType = params.miniProgramType
|
|
291
|
+
val scene = params.scene
|
|
292
|
+
|
|
293
|
+
val miniProgramObj = WXMiniProgramObject()
|
|
294
|
+
miniProgramObj.webpageUrl = webpageUrl
|
|
295
|
+
miniProgramObj.miniprogramType = miniProgramType
|
|
296
|
+
miniProgramObj.userName = userName
|
|
297
|
+
miniProgramObj.path = path
|
|
298
|
+
miniProgramObj.withShareTicket = withShareTicket!!
|
|
299
|
+
|
|
300
|
+
val msg = WXMediaMessage(miniProgramObj)
|
|
301
|
+
msg.title = title
|
|
302
|
+
msg.description = description
|
|
303
|
+
|
|
304
|
+
val onCoverDownloaded: (Bitmap?) -> Unit = { bitmap ->
|
|
305
|
+
bitmap?.let {
|
|
306
|
+
msg.thumbData = ExpoNativeWechatUtils.bmpToByteArray(bitmap, 32, true)
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
val req = SendMessageToWX.Req()
|
|
310
|
+
req.message = msg
|
|
311
|
+
req.scene = scene
|
|
312
|
+
|
|
313
|
+
sendEvent(
|
|
314
|
+
"ResponseData", bundleOf(
|
|
315
|
+
"id" to params.id,
|
|
316
|
+
"success" to wxApi?.sendReq(req)
|
|
317
|
+
)
|
|
318
|
+
)
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
if (!coverUrl.isNullOrEmpty()) {
|
|
322
|
+
ExpoNativeWechatUtils.downloadFileAsBitmap(
|
|
323
|
+
coverUrl,
|
|
324
|
+
object : DownloadBitmapCallback {
|
|
325
|
+
override fun onFailure(call: Call, e: IOException) {
|
|
326
|
+
this@ExpoNativeWechatModule.sendEvent(
|
|
327
|
+
"ResponseData", bundleOf(
|
|
328
|
+
"id" to params.id,
|
|
329
|
+
"success" to false,
|
|
330
|
+
"message" to e.localizedMessage
|
|
331
|
+
)
|
|
332
|
+
)
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
override fun onResponse(bitmap: Bitmap) {
|
|
336
|
+
onCoverDownloaded(bitmap)
|
|
337
|
+
}
|
|
338
|
+
})
|
|
339
|
+
} else {
|
|
340
|
+
onCoverDownloaded(null)
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
Function("requestPayment") { params: RequestPaymentParams ->
|
|
345
|
+
val payReq = PayReq()
|
|
346
|
+
|
|
347
|
+
payReq.partnerId = params.partnerId
|
|
348
|
+
payReq.prepayId = params.prepayId
|
|
349
|
+
payReq.nonceStr = params.nonceStr
|
|
350
|
+
payReq.timeStamp = params.timeStamp
|
|
351
|
+
payReq.sign = params.sign
|
|
352
|
+
payReq.packageValue = "Sign=WXPay"
|
|
353
|
+
payReq.extData = params.extData
|
|
354
|
+
payReq.appId = appid
|
|
355
|
+
|
|
356
|
+
sendEvent(
|
|
357
|
+
"ResponseData", bundleOf(
|
|
358
|
+
"id" to params.id,
|
|
359
|
+
"success" to wxApi?.sendReq(payReq)
|
|
360
|
+
)
|
|
361
|
+
)
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
Function("requestSubscribeMessage") { params: RequestSubscribeMsgParams ->
|
|
365
|
+
val templateId = params.templateId
|
|
366
|
+
val reserved = params.reserved
|
|
367
|
+
val scene = params.scene
|
|
368
|
+
|
|
369
|
+
val req = SubscribeMessage.Req()
|
|
370
|
+
req.scene = scene;
|
|
371
|
+
req.templateID = templateId;
|
|
372
|
+
req.reserved = reserved;
|
|
373
|
+
|
|
374
|
+
sendEvent(
|
|
375
|
+
"ResponseData", bundleOf(
|
|
376
|
+
"id" to params.id,
|
|
377
|
+
"success" to wxApi?.sendReq(req)
|
|
378
|
+
)
|
|
379
|
+
)
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
Function("launchMiniProgram") { params: LaunchMiniprogramParams ->
|
|
383
|
+
val userName = params.userName
|
|
384
|
+
val path = params.path
|
|
385
|
+
val miniProgramType = params.miniProgramType
|
|
386
|
+
|
|
387
|
+
val req = WXLaunchMiniProgram.Req()
|
|
388
|
+
req.userName = userName;
|
|
389
|
+
req.path = path;
|
|
390
|
+
req.miniprogramType = miniProgramType;
|
|
391
|
+
|
|
392
|
+
sendEvent(
|
|
393
|
+
"ResponseData", bundleOf(
|
|
394
|
+
"id" to params.id,
|
|
395
|
+
"success" to wxApi?.sendReq(req)
|
|
396
|
+
)
|
|
397
|
+
)
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
Function("openCustomerService") { params: OpenCustomerServiceParams ->
|
|
401
|
+
val corpId = params.corpid
|
|
402
|
+
val url = params.url
|
|
403
|
+
|
|
404
|
+
val req = WXOpenCustomerServiceChat.Req()
|
|
405
|
+
req.corpId = corpId
|
|
406
|
+
req.url = url
|
|
407
|
+
|
|
408
|
+
sendEvent(
|
|
409
|
+
"ResponseData", bundleOf(
|
|
410
|
+
"id" to params.id,
|
|
411
|
+
"success" to wxApi?.sendReq(req)
|
|
412
|
+
)
|
|
413
|
+
)
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
Function("appPureSignContract") { params: AppPureSignContractParams ->
|
|
417
|
+
val req = WXOpenBusinessWebview.Req()
|
|
418
|
+
req.businessType = 12 // 固定值
|
|
419
|
+
|
|
420
|
+
val queryInfo = HashMap<String, String>()
|
|
421
|
+
queryInfo["pre_entrustweb_id"] = params.preEntrustwebId
|
|
422
|
+
req.queryInfo = queryInfo
|
|
423
|
+
|
|
424
|
+
sendEvent(
|
|
425
|
+
"ResponseData", bundleOf(
|
|
426
|
+
"id" to params.id,
|
|
427
|
+
"success" to wxApi?.sendReq(req)
|
|
428
|
+
)
|
|
429
|
+
)
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
Function("requestMerchantTransfer") { params: RequestMerchantTransferParams ->
|
|
433
|
+
|
|
434
|
+
val wxSdkVersion = wxApi?.wxAppSupportAPI ?: 0
|
|
435
|
+
if (wxSdkVersion < com.tencent.mm.opensdk.constants.Build.OPEN_BUSINESS_VIEW_SDK_INT) {
|
|
436
|
+
|
|
437
|
+
sendEvent(
|
|
438
|
+
"ResponseData",
|
|
439
|
+
bundleOf(
|
|
440
|
+
"id" to params.id,
|
|
441
|
+
"success" to false,
|
|
442
|
+
"errorCode" to -1,
|
|
443
|
+
"errorStr" to "微信版本过低,请升级到8.0.45及以上版本"
|
|
444
|
+
)
|
|
445
|
+
)
|
|
446
|
+
return@Function
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
val req = WXOpenBusinessView.Req()
|
|
450
|
+
req.businessType = "requestMerchantTransfer"
|
|
451
|
+
|
|
452
|
+
val encodedMchId = java.net.URLEncoder.encode(params.mchId, "UTF-8")
|
|
453
|
+
|
|
454
|
+
val encodedAppId = java.net.URLEncoder.encode(appid ?: "", "UTF-8")
|
|
455
|
+
|
|
456
|
+
val encodedPackage = java.net.URLEncoder.encode(params.packageStr, "UTF-8")
|
|
457
|
+
|
|
458
|
+
val query = "mchId=${encodedMchId}&appId=${encodedAppId}&package=${encodedPackage}"
|
|
459
|
+
req.query = query
|
|
460
|
+
|
|
461
|
+
sendEvent("ResponseData", bundleOf("id" to params.id, "success" to wxApi?.sendReq(req)))
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
// 通用的 openBusinessView 接口
|
|
465
|
+
// 支持所有 businessType,如 'mp_business_type', 'wxpayScoreDetail', 'wxpayScoreEnable' 等
|
|
466
|
+
Function("openBusinessView") { params: OpenBusinessViewParams ->
|
|
467
|
+
val wxSdkVersion = wxApi?.wxAppSupportAPI ?: 0
|
|
468
|
+
if (wxSdkVersion < com.tencent.mm.opensdk.constants.Build.OPEN_BUSINESS_VIEW_SDK_INT) {
|
|
469
|
+
sendEvent(
|
|
470
|
+
"ResponseData",
|
|
471
|
+
bundleOf(
|
|
472
|
+
"id" to params.id,
|
|
473
|
+
"success" to false,
|
|
474
|
+
"errorCode" to -1,
|
|
475
|
+
"errorStr" to "微信版本过低,请升级到8.0.45及以上版本"
|
|
476
|
+
)
|
|
477
|
+
)
|
|
478
|
+
return@Function
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
val req = WXOpenBusinessView.Req()
|
|
482
|
+
req.businessType = params.businessType
|
|
483
|
+
req.query = params.query
|
|
484
|
+
req.extInfo = params.extInfo ?: ""
|
|
485
|
+
|
|
486
|
+
sendEvent(
|
|
487
|
+
"ResponseData",
|
|
488
|
+
bundleOf(
|
|
489
|
+
"id" to params.id,
|
|
490
|
+
"success" to wxApi?.sendReq(req)
|
|
491
|
+
)
|
|
492
|
+
)
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
fun handleIntent(intent: Intent?) {
|
|
498
|
+
wxApi!!.handleIntent(intent, this)
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
override fun onReq(req: BaseReq?) {}
|
|
502
|
+
|
|
503
|
+
override fun onResp(baseResp: BaseResp?) {
|
|
504
|
+
val convertedData = NativeWechatRespDataHelper.downcastResp(baseResp)
|
|
505
|
+
|
|
506
|
+
sendEvent("ResponseFromNotification", convertedData)
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
}
|