override fun onCreateLoader(id: Int, args: Bundle?): Loader<Cursor> { val account = CloverAccount.getAccount(context) val uri = OrderContract.Summaries.contentUriWithAccount(account) val selection = "customer_name LIKE %" val selectionArgs = arrayOf("%foo%") return CursorLoader( this, uri, null, selection, selectionArgs, null ) }The loader won't return any orders, even if there is a customer named "foo". Omitting the selection and selectionArgs arguments does return orders. However, when trying to load one of those orders and view the name of the customer for that order, the customer name is null. For example:
val orderConnector = OrderConnector(context, account, null) orderConnector.connect() val order = orderConnector.getOrder(orderId) order.customers[0].id // this returns a value order.customers[0].firstName // this is null order.customers[0].lastName // this is also nullUsing the REST API to get the customer (/v3/merchants/[ merchantID ]/customers/[ customerID ]), I can see that the first and last name is valid for the customer. However, I can no longer get the name from the order using the OrderConnector in the Android SDK.
Both of these behaviors worked several weeks ago (querying by customer name using the OrderContract uri, and getting customer name from orders with OrderConnector).