Customize the android App created by simulink

14 views (last 30 days)
Alireza Ghaderi
Alireza Ghaderi on 13 May 2020
Commented: Alireza Ghaderi on 17 Jul 2020
After using Simulink support package for android, I wonder if there is a away to customize the view of this application...
or adding more advanced stuffs such as flight instruments to the app...
Is it possible?

Answers (1)

Sutanu Maiti
Sutanu Maiti on 22 May 2020
Yes, once generated app code is exported to Android Studio, user can modify the UI (in Android Studio) and run on device (from Android Studio). It will run the Simulink generated Algorithm also under the hood.
ToApp Block and From App Block can be used to access Simulink model data to and from Android App's main activity's java function. User needs to mention the function name (what they write in Java after exporting to Android Studio) in the block mask. Simulink model generated C code then calls those Java functions to give / take data. There are examples Set Position of Bebop Drone on Gazebo Simulator from Android Device Using ROS, And Visualize Sensor Data from Android Device in RViz that uses this workflow to integrate custom java code with 3rd party library along with Simulink model generated code.
  1 Comment
Alireza Ghaderi
Alireza Ghaderi on 17 Jul 2020
Hello Sir
I tried to follow the steps in the link you gave with the latest version of android studio and matlab.
But when i deploy the app to phone, it crashes and wont start... Is there a better guide for this?
and one more question..in the java sources I only found the interface files and views... Where are the computation and processes code...arent they used when java code generation happens?

Sign in to comment.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by