Package 

Interface IStartableService


  • 
    public interface IStartableService
    
                        

    Implement and provide this interface as part of service registration to indicate the service wants to be instantiated and its start function called during the initialization process.

    When IStartableService.start is called, both OneSignal.initWithContext and OneSignal.setAppId have been called. This means the following is true:

    • An appContext is available in IApplicationService.appContext.

    • An appId is available in ConfigModel.appId via ConfigModelStore.get

    When started there is no guarantee that any other data is available. Typically a startable service can asynchronously start some lengthy process that doesn't require immediate use.

    • Method Summary

      Modifier and Type Method Description
      abstract Unit start() Called when the service is to be started.
      • Methods inherited from class java.lang.Object

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

      • start

         abstract Unit start()

        Called when the service is to be started. The appId and appContext have already been established.