Hm, it’s reliably reproducible here using the Android emulator and testing different Android versions (8.1 and 9.0).
I’ve attached a logcat.txt from a failing test run. logcat.txt
Maybe that helps in finding the cause of the failure.
I would like to query the list of
AndroidContact using a subclass of
AndroidAddressBook, but independent of any associated
Account, like so.
val contacts = myAddressBook.queryContacts(null, null)
Now this is very difficult because account name and type are set in final method
AndroidAddressBook.syncAdapterURI(Uri), that many parts of that functionality rely on.
I would love this method to either be
open or have the address book support another way to perform
Account independent operations. A simple
open would allow me to change the functionality like so, giving me exactly the results I need.
override fun syncAdapterURI(uri: Uri) = uri
What are your thoughts?
AndroidAddressBookis designed to access raw contacts, which should always be bound to an account.
Do you want to access contacts or raw contacts? What is your use case?
I misunderstood indeed. I was in fact looking for the device’s (default) account name and type that stores local accounts. I solved this issue now. Thank you!