Interface MongoDbMobileProvider.EventListener

  • Enclosing class:
    MongoDbMobileProvider

    public static interface MongoDbMobileProvider.EventListener
    EventListener is a listener interface which can be registered with this provider to react to battery and memory level events.
    • Method Summary

      Modifier and Type Method Description
      void onLowBatteryLevel()
      Called by the provider when it receives a ACTION_BATTERY_LOW broadcast event from the Android system.
      void onOkayBatteryLevel()
      Called by the provider when it receives a ACTION_BATTERY_OKAY broadcast event from the Android system.
      void onTrimMemory​(String memoryTrimMode)
      Called by the provider when its onTrimMemory method is invoked by the Android system.
    • Method Detail

      • onLowBatteryLevel

        void onLowBatteryLevel()
        Called by the provider when it receives a ACTION_BATTERY_LOW broadcast event from the Android system.
      • onOkayBatteryLevel

        void onOkayBatteryLevel()
        Called by the provider when it receives a ACTION_BATTERY_OKAY broadcast event from the Android system.
      • onTrimMemory

        void onTrimMemory​(String memoryTrimMode)
        Called by the provider when its onTrimMemory method is invoked by the Android system.
        Parameters:
        memoryTrimMode - the MongoDB memory trim mode that should be passed as the argument to an embedded MongoDB trimMemory command. The listener is not invoked when the Android system sends the TRIM_MEMORY_UI_HIDDEN level.