Class ContextService

    • Constructor Detail

      • ContextService

        public ContextService​(IComponentIdentifier provider)
        Create a new ContextService.
    • Method Detail

      • getFile

        public IFuture<java.io.File> getFile​(java.lang.String name)
        Returns a File
        Specified by:
        getFile in interface IContextService
        Parameters:
        name - File name
        Returns:
        File
      • getSharedPreferences

        public IFuture<IPreferences> getSharedPreferences​(java.lang.String preferenceFileName)
        Gets a Shared Preference Container. Returns null on Desktop Systems.
        Specified by:
        getSharedPreferences in interface IContextService
        Parameters:
        preferenceFileName -
      • dispatchEvent

        public IFuture<java.lang.Boolean> dispatchEvent​(IJadexAndroidEvent event)
        Dispatches an Event to the Android UI / Activity. Does nothing on Desktop Systems.
        Specified by:
        dispatchEvent in interface IContextService
        Parameters:
        event - IJadexAndroidEvent
        Returns:
        true, if at least one receiver was registered for this event and delivery was successful, else false.
      • openFile

        public IFuture<java.lang.Void> openFile​(java.lang.String path)
                                         throws java.io.IOException
        Opens a File with the default application.
        Specified by:
        openFile in interface IContextService
        Parameters:
        path -
        Throws:
        java.io.IOException