FromApp
Receive data from 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 FromApp block to receive data from a method in an Android® app. After code generation is completed, you can modify the generated code to configure the Method name, Data type, and Data size (N) parameters to match those of the method.
For example, consider a method, public int[] FromAppFcn()
, that sends
three data elements each time it runs, and the data type of those elements is
int32
. In this case, set these parameter values.
Method name to
FromAppFcn
Data size to
3
Data type to
int32
The method in the Android app must send a data type that this block can accept.
Note
During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation.
Ports
Output
Parameters
Version History
Introduced in R2014a