Send data to Android app


Simulink Support Package for Android Devices / Advanced


Send data to a specified method in the Android app. The method must exist in the default activity.

For example, suppose the following:

  • The block input is int32(ones(3,1))

  • The method name is ToAppFcn

Then, the expected method in the Android app would be:

public void ToAppFcn(int[] inData)
Where inData is an integer array of three elements.

The ToApp block input accepts the following data types: uint8, int8, uint16, int16, uint32, int32, single, and double.


Method name

Specify the name of a method in the Android app. You must add the method to the default Activity by modifying the generated app.

Introduced in R2014a