Allow to open ObjectBox databases with a generic browser.
Main question: should this be something you can integrate into an app? Or do you prefer an desktop app? Or a web app?
Pro app:
Pro desktop:
Pro web app (e.g. write server in Kotlin with embedded netty):
Pro Stetho
What would you prefer and why?
I think, Stetho plugin would be enough for the first time. Realm users on Linux and Windows use such kind of database access because native realm browser app is only available for MacOS.
Very agree with you!
The realm browser app is fantastic for iOS development, since the simulator's filesystem lives on your Mac's filesystem. It's not really so useful for Android development though, due to having to pull DBs off the phone before being able to do anything.
If your primary usecase is Android, a Stetho plugin (or something that works like Stetho) is a great idea. If you want something that'll work cross-platform though, is there an option other than a desktop app?
Actually, I think doing it as an embedded web server might be the best option in the long run. Maybe with web components (ping @mreichelt).
Yay, web components! :D
I also believe that a server containing a small web app would be the coolest way to do it.
And it shouldn't be too hard to accomplish. Especially making it an optional debug only dependency could save a lot of time.
@greenrobot I hacked something: https://github.com/mreichelt/ObjectBox-viewer
adb forward tcp:8912 tcp:8912 to forward the internal port to the host machine
Some notes:
@mreichelt Cool! Thanks for investigating.
Some comments:
Btw, do you know a powerful datagrid web component? Saw the one from Vaadin on top of Polymer, but not sure about it..
I'd go with a stetho plugin for the simple reason that it has virtually no overhead to setup.
@ArthurSav where is the stetho plugin for objectbox?
@luozheng1985 there is no steho plugin. We'll probably go a different route here.
Update: we started working on this and want to release soon after 1.0.
The plan is to offer a web based data browser (using an embedded web server in a debug version of the library). Maybe Polymere based? Thoughts welcome.
Please don't have the same strong connection Stetho uses. It's such a PITA to reattach each time the app is restarted!
@greenrobot Hi, i just made simple objectbox browser based on https://github.com/amitshekhariitbhu/Android-Debug-Database.
Add, edit, delete operations are not supported (for now), only display.
You can download (if you want) library with sample project (made in As 2.3.3) from https://github.com/kosiarska/ObjectBoxDebugBrowser
Please tell me what you think. Btw. your libraries saved me many times :), thank you for your amazing work.
How to see the database and table in android mobiles
How to write the database in sd card for seeing the data in android
https://github.com/renyuzhuo/rviewer
In your build.gradle:
dependencies {
debugCompile 'cn.renyuzhuo.rviewer:rviewer:1.0.2'
releaseCompile 'cn.renyuzhuo.rviewer:rviewer-no-op:1.0.2'
}
In your Application class:
public class App extends Application {
private BoxStore boxStore;
private static App app;
@Override
public void onCreate() {
super.onCreate();
boxStore = MyObjectBox.builder().androidContext(this).build();
app = this;
ArrayList<Class> classes = new ArrayList<>();
classes.add(Note.class); // Your Entitys
ObjectViewBoxManager.getInstance().init(boxStore, classes);
}
}
Notice: You Should all Add toString() like:
@Override
public String toString() {
return "Note{" +
"id=" + id +
", text='" + text + '\'' +
", date=" + date +
'}';
}
All the things is done.

Is there any desktop software can access data.mdb?@greenrobot
I'm sorry , I use Stetho, but there is no any db file.

And I'm sure that I have a data.mdb file. I use RE can find the file

Why there is show nothing in the Stetho?
@Bringoff
@iBotasky
I don't believe Stetho is supported.
You have to use the objectbox browser
@ArthurSav OK, Let me try for it, thanks!
Hello all,
I created SQLScout, a plugin for Android Studio, that provides support for Sqlite:
We are thinking about creating another plugin that provides similar features, but for ObjectBox (including automated migration from SQLite to ObjectBox.)
Our question is, would ObjectBox users consider using this plugin?
Many thanks in advance.
@yvonneprice
Current implementation of the objectbox browser is nice but it lucks a lot of stuff. Also it forces you to go out of your flow(IDE) in order to debug.
So i'd probably use it given that it's part of intellij
@ArthurSav
Thank you for your feedback. I completely agree, having all the tooling, including database management integrated in one place (inside IDE) minimizes context switching and flow interruptions, increasing developers' productivity.
The idea of objectbox browser is nice but only work for Android project. I think we need a way to access the data file directly on Desktop.
@nguyenxndaidev Please thumbs up or give #519 some love. -ut
Most helpful comment
@greenrobot I hacked something: https://github.com/mreichelt/ObjectBox-viewer
adb forward tcp:8912 tcp:8912to forward the internal port to the host machineSome notes: