Giter VIP home page Giter VIP logo

realm-browser's Introduction

Description

This library project provides a convenient way for Android developers to see the contents of their Realm database files on the device.

It's a fork of dmytrodanylyk/realm-browser which was originally created by Danylyk Dmytro but sadly discontinued.

Integration codecov

Releases: Build Status - Develop branch (Snapshots): Build Status

The project is available via JitPack.io.

  1. Add the JitPack repository to your build file
allprojects {
        repositories {
        ...
        maven { url "https://jitpack.io" }
        }
    }
}
  1. Add the dependency
dependencies {
    debugCompile 'com.github.jonasrottmann.realm-browser:realm-browser:0.0.14'
    testCompile 'com.github.jonasrottmann.realm-browser:realm-browser-no-op:0.0.14'
    releaseCompile 'com.github.jonasrottmann.realm-browser:realm-browser-no-op:0.0.14'
}

The no-op version of Realm Browser has empty functions which do nothing. It is not necessary to include this, but you may if you do not want to access Realm Browser in release mode. If you want to use a build of the newest development use compile "com.github.jonasrottmann.realm-browser:realm-browser:develop-SNAPSHOT" instead.

  1. Exclude support libraries (maybe optional): Realm Browser depends on Android support libraries, so you might want to exclude them from your project if they conflict with the ones you include:
depedencies {
    debugCompile ('com.github.jonasrottmann.realm-browser:realm-browser:0.0.14') {
        exclude group: 'com.android.support';
    }
}
  1. Add ProGuard rules (optional): Use these if you enable minification for debug builds or want to use Realm Browser in release builds.
# Realm Browser
-keep class de.jonasrottmann.realmbrowser.* { *; }
-keep class android.support.v7.widget.SearchView { *; }
-keep class android.support.v7.view.** { *; }

Usage

If you want to see all your database files:

RealmBrowser.startRealmFilesActivity(context);

If you want to see all the tables in a database call:

RealmBrowser.startRealmModelsActivity(context, realmConfiguration);

To display a notification from which the Realm Browser can be started:

RealmBrowser.showRealmFilesNotification(context);
RealmBrowser.showRealmModelsNotification(context, realmConfiguration);

There are also App Shortcuts available for devices running Android 7.1 or newer:

RealmBrowser.addFilesShortcut(context);
RealmBrowser.addModelsShortcut(context, realmConfiguration)

For a full working example check out the sample app.

TODO

What's on the roadmap... ๐Ÿš€

  • Tests
  • Be able to edit/create objects
  • Bidirectional scrolling in the browser window
  • Clean up
  • Nice architecture
  • Live reload the browser if updates happen in the background
  • Javadoc ๐Ÿ“š

Other browsers

If you're looking for a Realm browser for your iOS Swift projects check out bearjaw/RBSRealmBrowser ๐ŸŽ‰

License

The MIT License (MIT)

Original Work: Copyright (c) 2015 Danylyk Dmytro

Modified Work: Copyright (c) 2015 Rottmann, Jonas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.