Querying Androids ContactsContract in Kotlin -


i having bit of trouble trying query contactscontract in android app written in kotlin. android studio gives errors unresolved references example contactscontract.contacts._id. know right way query these in kotlin?

this open bug in kotlin. please refer to: https://youtrack.jetbrains.com/issue/kt-3180.

for use java access such fields workaround:

public class contactssupport {     public static interface basecolumns {         public static final string _id = contactscontract.rawcontacts._id;         public static final string _count = contactscontract.rawcontacts._count;     } } 

so can write contactssupport.basecolumns._id in kotlin.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -