Samsung GALAXY Android FromApp

Receive data from Android app

Library

Simulink® Support Package for Samsung GALAXY® Android™ Devices

Description

Receive data from a function in an Android app.

Configure the Function name, Data type, and Data size parameters to match those of the function.

For example, suppose that the function:

  • Is public int[] FromAppFcn().

  • Sends three data elements each time it runs.

  • The data type of those data elements is int32.

Then, set:

  • Function name to FromAppFcn

  • Data size to 3

  • Data type to int32

The function in the Android app must send a data type that this block can accept.

During simulations without hardware, this block outputs zeros. See Block Produces Zeros or Does Nothing in Simulation.

Dialog Box

Function name

The name of the function in the Android app.

Data type

The data type of the data sent by the function.

Data size

The number of data elements the function sends to the block each time it runs.

Sample time

Specify how often the block reads the function.

Smaller values require the processor to complete the same number of instructions in less time, which can cause task overruns.

Was this topic helpful?