Package 

Class AndroidObjectBrowser


  • @Deprecated() 
    public class AndroidObjectBrowser
    extends Admin
                        

    A helper class to start the ObjectBox Admin web app used to browse and gain insights into the database.

    Usage requires manually configuring some ObjectBox dependencies, see the documentation for more details.

    if (BuildConfig.DEBUG) {
        boolean started = new AndroidObjectBrowser(boxStore).start(this);
        Log.i("ObjectBoxAdmin", "Started: " + started);
    }
    
    After start is called a notification is displayed. Tap it to open this Admin URL on the device. Alternatively, look for a logcat message from Admin to obtain the URL. Use {@code adb forward} to access the URL on your development machine.

    Tapping the notification starts a foreground service to keep this app running in the background. Stop this keep-alive service from the notification.

    See the web documentation for details.

    • Constructor Summary

      Constructors 
      Constructor Description
      AndroidObjectBrowser(BoxStore boxStore) Creates a helper to control Admin for the given {@code boxStore}.
    • Method Summary

      Modifier and Type Method Description
      int getNotificationId() The id passed to notify for the Admin notification.
      void setNotificationId(int notificationId) The id passed to notify for the Admin notification.
      boolean start(Context context) Starts the ObjectBox Admin HTTP server.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AndroidObjectBrowser

        AndroidObjectBrowser(BoxStore boxStore)
        Creates a helper to control Admin for the given {@code boxStore}.