1

I don't expect functionality to work, but shouldn't this be listed in service? Please suggest if I am missing anything.

I have added Service tag in AndroidManifest.xml

<service
            android:name=".MyAutofillService"
            android:label="My Autofill Service"
            android:permission="android.permission.BIND_AUTOFILL_SERVICE"
            android:exported="true">
            <intent-filter>
                <action android:name="android.service.autofill.AutofillService" />
            </intent-filter>

</service>

MyAutofillService class looks like this,

package com.example.myapplication

import android.os.CancellationSignal
import android.service.autofill.*

class MyAutofillService : AutofillService() {
    override fun onFillRequest(p0: FillRequest, p1: CancellationSignal, p2: FillCallback) {
        TODO("Not yet implemented")
    }

    override fun onSaveRequest(p0: SaveRequest, p1: SaveCallback) {
        TODO("Not yet implemented")
    }
}

Added code to start service, I can see it's started.

startService(Intent(applicationContext, MyAutofillService::class.java))

Only thing that is not happening is it's not listed in Autofill service list.

Pranit Kothari
  • 9,721
  • 10
  • 61
  • 137
  • Maybe because `android:exported` is not `true`? – Blehi Apr 04 '22 at 08:09
  • I have made it true, still same behavior. – Pranit Kothari Apr 04 '22 at 08:28
  • I'm having the same problem, and it seems like [these guys](https://stackoverflow.com/questions/69831769/autofill-service-isnt-shown-in-setting-autofill-service-list-in-android) from 10 months ago are having it, too. – Bip901 Sep 23 '22 at 11:24
  • Oldest duplicate I could find is [this question](https://stackoverflow.com/questions/52287062/unable-to-register-autofill-service-in-android-oreo) from 4 years ago. – Bip901 Sep 23 '22 at 11:32

0 Answers0