IMuvslideObserver

Version: 1.0.0.0

interface IMuvslideObserver

interface ForestIndieGames.Muvslide.IMuvslideObserver

Implement this interface to receive notifications from a MuvslideConnection instance. The notifications include input received from the Muvslide App, connection status, and runtime exceptions.

Note that this is called from a parallel thread, some applications (e.g. Unity applications) don't allow manipulation from threads different to the main one. In those cases, you can set a boolean variable indicating the input received, and read it later from the main thread.

Once the observer knows about the input, you can use the MuvslideInput object from the MuvslideConnection instance in order to obtain the input details.

Use connection status messages to identify when the connection starts and ends:

  • Connect - The connection setup completed and the smartphone is ready for sending input data.

  • Disconnect - The user closed the input screen in the smartphone.

There are other connection messages that don't follow a specific format and can be used to debug connection issues.

Input messages inform about touch and motion input changes, the possible messages are:

  • TapDown

  • TapUp

  • Scroll

  • Fling

  • Motion


Methods

MuvslideNotify

void MuvslideNotify (string message)

Method called by MuvslideConnection to notify the observers about any input received from the Muvslide App, connection status, and runtime exceptions.

Note that this is called from a parallel thread, some applications (e.g. Unity applications) don't allow manipulation from threads different to the main one. In those cases, you can set a boolean variable indicating the input received, and read it later from the main thread.

Once the observer knows about the input, you can use the MuvslideInput object from the MuvslideConnection instance in order to obtain the input details.

Use connection status messages to identify when the connection starts and ends:

  • Connect - The connection setup completed and the smartphone is ready for sending input data.

  • Disconnect - The user closed the input screen in the smartphone.

There are other connection messages that don't follow a specific format and can be used to debug connection issues.

Input messages inform about touch and motion input changes, the possible messages are:

  • TapDown

  • TapUp

  • Scroll

  • Fling

  • Motion

The client can also know if there is input available by directly calling MuvslideInput "IsNew[X]Available" methods, e.g. IsNewMotionAvailable.

Parameters

Parameter Description
string message Message to be read by the observer.