2

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.

Andy Dent
  • 17,578
  • 6
  • 88
  • 115
Jinesh Francis
  • 3,377
  • 3
  • 22
  • 37
  • follow this link: https://github.com/uPhyca/stetho-realm and https://medyo.github.io/2016/browse-populate-and-export-realm-database-on-android/ – Mehta May 31 '16 at 13:17

3 Answers3

7

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.

Community
  • 1
  • 1
Andy Dent
  • 17,578
  • 6
  • 88
  • 115
4

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

Tarcisio Wensing
  • 422
  • 1
  • 3
  • 13
2

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());
humble_wolf
  • 1,497
  • 19
  • 26
  • It's 2021 and the `WickeDev` repo no longer exists... There is the `https://github.com/uPhyca/stetho-realm/raw/master/maven-repo` repo but it has an older version that does not seem to work. – m_katsifarakis May 01 '21 at 10:19