Questions tagged [objectbox-android]

17 questions
6
votes
0 answers

Can't test with coverage in Android Studio and ObjectBox bacause of "cannot find symbol" compilation errors in auto-generated files

I'm using Android studio 4.1.1, ObjectBox 3.0.1 and Kotlin 1.5.10. The tests run nicely when I hit the run button on the test class or run ./gradlew :app-core:test, but when I click on Run X with coverage the tests run through, I'm shown Project Is…
2
votes
1 answer

ObjectBox, how to drop-everything migration on conflicts?

In my case saved data can be cleaned without fear in case of model changes, there is a better way to do this ? private val dataSource = try { MyObjectBox.builder().androidContext(context).build().boxFor(XXXX::class) } catch (e: Exception) { …
Alessandro Scarozza
  • 4,273
  • 6
  • 31
  • 39
1
vote
1 answer

Object Box alpine support?

I am trying to build android project in CI/CD environment in alpine distrib with eclipse temurin jdk-11 and the following error happened during unit tests : java.lang.LinkageError: [ObjectBox] Loading native library failed, please report…
1
vote
1 answer

ObjectBox, sum a property by grouping another property

Imagine I have this table: tagId amount 1 100 1 150 2 200 2 250 And i need to sum the amount by grouping the tagId. In SQL we can do this by: SELECT tagId, SUM(amount) FROM orders GROUP BY tagId; Query…
Amin Mastani
  • 39
  • 1
  • 7
1
vote
0 answers

How do I change the primary key in ObjectBox?

The primary key existed before and now it needs to be made new. This is how I modified it, but duplicate data will appear. Before: @Entity class A { @Id(assignable = true) long id; } Now: @Entity class A { @Id long boxId; long…
Monster
  • 11
  • 2
1
vote
2 answers

Objectbox error: "W/Box: [Cl-Lws] LWS: Unable to open socket [Cl-Lws] LWS client connection error: unable to open socket"

I am trying to sync my android application with the sync server, but the client doesn't seem to be able to connect to the server. The Admin UI is running perfectly on localhost:9980. The server is running on docker. 001-13:29:41.2231 [INFO ]…
Menci
  • 73
  • 7
1
vote
1 answer

Objectbox Sync Server Configuration Troubleshooting

Follow guide from https://sync.objectbox.io/objectbox-sync-server I already has my downloaded Objectbox sync server files Download My Objectbox sync-server file (i got it from Objectbox Team) that and extract it Copy my objectbox-model.json…
Jacob Handaya
  • 189
  • 1
  • 9
0
votes
0 answers

Entity implements Parcelable

I'm a Android Coder,The version of ObjectBox I was using was 3.1.2, and I couldn't make the entity class implement the Parcelable interface. If I did, I would get an error at run time ==> [class not def exception] I want Entity Class in OB can…
0
votes
0 answers

Database upgrade on objectbox and drop old table

What i want to achieve is following things. At some point i want do some updates on my data and database. What i want to do is to drop a table and repopulate it again, in order to keep the id-s same for some of the items Today i populate a table…
0
votes
0 answers

Update android objectbox from 2.9.1 to newer

I am trying to update android objectbox from V2.3 to newer one. The newest would be V3.5.0. But I can't, the MyObjectBox class is not found. In the latest version, in the documentation, the warning is written: Restore compatibility for Android…
Jonas Rotilli
  • 176
  • 1
  • 3
  • 12
0
votes
1 answer

Can the *.mdb file be open in two thread at the same time?

Android Objectbox Version 3.1.2 Flutter Objectbox Version 1.4.1 Android code does read/write operation Flutter code only does read operation Sometimes the android side throws this exception: Could not renew tx (another read transaction is still…
0
votes
1 answer

ObjectBox & RecyclerView - Filter & Sort

When using LiveData for the RecyclerView with filters, the code looks usually like this: ViewModel.kt private val selectedCategory = MutableLiveData() val channels: LiveData> ... init{ channels =…
0
votes
1 answer

Can an ObjectBox property have multiple annotations?

ObjectBox documents several annotations that can be applied to and entity's properties. Can one property have multiple annotations? For example, would this be a valid entity? @Entity data class User( @Id var id: Long = 0, @Index …
pdiffley
  • 603
  • 9
  • 18
0
votes
1 answer

Update only selected columns in ObjectBox Android

Is it possible that update only selected columns in ObjectBox Android? For example, there are 5 columns in "Remind" Entity @Entity data class Remind ( @Id var id: Long = 0, var title: String? = null, var memo: String? = null, var…
Tieria
  • 333
  • 3
  • 11
0
votes
0 answers

Is ObjectBox Sync Suit for Membership apps?

I am new to ObjectBox Let say we have membership apps for customer app which allow customer to order items every user using his own phone to order, so in my opinion i don't think it is good to "sync" for "customer 1" to "customer 2" phone, which is…
1
2