Reputation: 3655
How to view database tables created using realm,for testing purpose.Is there any tool avilable to view the tables?.Anyone knows the answer please help.Thanks in advance.
Upvotes: 2
Views: 6336
Reputation: 1668
This is working for me in late 2019 with nearly latest version of everything:
In your build.gradle file
repositories {
maven() {
url 'https://github.com/WickeDev/stetho-realm/raw/master/maven-repo'
}
}
dependencies {
implementation 'com.facebook.stetho:stetho:1.5.1'
implementation 'com.uphyca:stetho_realm:2.2.2'
}
In your Application(java) file:
Realm.init(this);
//--- for development setting only
Stetho.initialize(
Stetho.newInitializerBuilder(this)
.enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
.enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
.build());
Upvotes: 2
Reputation: 442
Updating for future people that will face the same issue:
the stetho-realm original by uPhyca is not supporting latest versions of realm (when you open at chrome, the app crashes)
So, you should install a fork working, see:
https://github.com/uPhyca/stetho-realm/issues/62#issuecomment-346927558
Thanks to @WickedDev
Upvotes: 4
Reputation: 17969
There is a plugin stetho-realm and installation of it documented in this StackOverflow answer.
This is from a third-party, not from Realm but very much encouraged by us. We love our community.
Upvotes: 7