Allow background task for android deployed app

조회 수: 1 (최근 30일)
Fabrizio Sera
Fabrizio Sera 2020년 5월 14일
답변: Sutanu Maiti 2020년 5월 22일
Hi everybody, I'm Fabrizio from Italy.
I'm trying to develop an application for Android using the Simulink Support Package.
The application read and log the sensors and thanks the block AHRS of the sensor fusion toolbox return a NED frame and plot the accelretion in this frame on the screen. I future I need to add other features to this.
THE PROBLEM is that when i block the screen or if i Exit the application (no closing it) the application stops to reed sensors and the application is unsufull.
How can I allowed backgroung workint (or multitasking ability) to my deployed Simulink scheme?

답변 (1개)

Sutanu Maiti
Sutanu Maiti 2020년 5월 22일
Once generated app code is exported to Android Studio, you can add/modify the java/xml code (in Android Studio) and run on device (from Android Studio). It will run the Simulink generated Algorithm also under the hood. If you investigate more into main activity class code, you may find the real-time code is being started and stopped from activity's life cycle methods. You can play around there and make it working eveen when app goes to background.

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by