ToApp
Send data to method of app
Add-On Required: This feature requires the Simulink Support Package for Android Devices add-on.
Libraries:
Simulink Support Package for Android Devices /
Advanced
Description
Use the ToApp block to send data to a specified method in the Android® app. The method must exist in the default activity. For example, suppose the
block input is int32(ones(3,1))
and the method name is
ToAppFcn
. Then, the expected method in the Android app would
be:
public void ToAppFcn(int[] inData)
inData
is an integer array of three elements.Note
During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation.
Ports
Input
Parameters
Version History
Introduced in R2014a