uniapp原生插件开发实战——Android打开文件到自己的app

项目配置

原生Module类插件创建详情请看uniapp原生插件开发实战——集成Android端的Twitter登陆

配置build.gradle:

apply plugin: 'com.android.library'
android {
  ...
}

repositories {
    flatDir {
        dirs 'libs'
    }
}

dependencies {
    // 添加uniapp必要的依赖,参考同上
    compileOnly 'androidx.annotation:annotation:1.0.0'
    implementation 'com.alibaba:fastjson:1.1.46.android'
    implementation 'com.facebook.fresco:fresco:1.13.0'
    implementation 'com.blankj:utilcode:1.29.0'
}

然后配置AndroidManifest.xml文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.register_schemes">
    <application>
        <activity android:name="com.wgg.registerschemes.RegisterActivity"
            android:requestLegacyExternalStorage="true"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="file" />
                <data android:scheme="content" />
                <data android:mimeType="*/*" />
            </intent-filter>
        </activity>
    </application>
  <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <category android:name=&#
  • 14
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值