ObjectBox 1.1 brings a data browser to view objects inside ObjectBox databases. This has become the most requested feature, so we are very happy about finally releasing it. The new data browser actually runs in the browser as it is an embedded web app. Thus, you can quickly check data on your device on the fly, or on your development machine to make use of your screen estate.

Setup

Because the object browser is a debugging tool, you should only use it for your debug builds. Your release builds should still use the regular “android-objectbox” artifact. Use this Gradle config before the line apply plugin: 'io.objectbox' :

Because the object browser opens a http port locally for the browser app, you need to ensure your app also has the INTERNET permission:

In your app code, simply add those lines right after you created the BoxStore, e.g. in your Application class:

As you can see in the video, the object browser comes with a notification to quickly open it on your device.

Running on your dev machine

To open it on your development machine, check the Android locat logs. It will print the port and the ADB command needed to do the port forwarding. Because it usually uses port 8090, the command to run usually is:

Once the port forwarding is in place you can open the browser using “http://localhost:8090/index.html” on the big screen.

ObjectBox 1.1 also come with other minor features and a couple of fixes. Check the changelog for details.

 

Screenshot