Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RViewer-ObjectBox data.mdb viewer #21

Open
RWebRTC opened this issue Dec 7, 2017 · 0 comments
Open

RViewer-ObjectBox data.mdb viewer #21

RWebRTC opened this issue Dec 7, 2017 · 0 comments
Labels

Comments

@RWebRTC
Copy link
Collaborator

RWebRTC commented Dec 7, 2017

RViewer

A library to check the data saved by ObjectBox.

打开、查看 ObjectBox 存储的 data.mdb 文件。

Getting started

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.

Thanks

ObjectBox-viewer

License

MIT

@RWebRTC RWebRTC added the Blog label Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant