我按照this指南构建了自动填充服务。我通过 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>
`
但是,当我进入“设置”>“系统”>“语言和输入法”>“自动填充服务”时, 我不认为我的定制服务是一个选项。
很想在这里听到关于这个问题的任何想法。