自定义安卓自动填充服务不会显示在自动填充应用中



我按照本指南构建了一个自动填充服务。我通过Android Studio在Pixel API 27模拟器上运行它。

这是我的清单文件:`

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<service android:name=".EmailAddressFiller"
android:permission="android.permission.BIND_AUTO_FILL">
<meta-data android:name="android.autofill"
android:resource="@xml/email_address_filler"/>
<intent-filter>
<action android:name="android.service.autofill.AutofillService"/>
</intent-filter>
</service>
<activity android:name=".MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

`

然而,当我进入"设置">"系统">"语言与语言"时;输入>自动填充服务,我不认为我的定制服务是一种选择。

很想在这里听到关于这个问题的任何想法。

  1. EmailAddressFiller类必须继承自AutofillService类
  2. 从Android 12开始,必须设置Android:exported:android:exported=";真";(true可将此服务导出到其他应用程序(

最新更新