RDK Resources

[*ASP Wiki*]

Code Management Facility

Code Releases

RDK Forums

[RDK Conferences]

RDK Support

Archives

Papers & Presentations Archive

In the News!

Skip to end of metadata
Go to start of metadata

Apps should support a suspend and resume option if needed so they can start quickly and stay running in the background. Apps when suspended should free all graphics and AV resources while using minimal CPU and RAM while running in the background. When the app is resumed it should be usable by the user in a few seconds.

The app manager is ready to call suspend/resume on your app through rt. You will need to initialize and register an object to rt that contains these functions.

// Your object to be registered must inherit the rtObject interface
// Here you will declare your object and define functions.
// Header file:
class MyObject : public rtObject {
 public:
  rtDeclareObject(MyObject, rtObject);
  rtMethodNoArgAndNoReturn("suspend", suspend); //declare suspend function to rt
  rtMethodNoArgAndNoReturn("resume", resume); //declare resume function to rt

  rtError suspend(); //actual suspend c++ function
  rtError resume(); //acutal resume c++ function

//CPP file:
// Define rt object and methods
rtDefineObject (MyObject, rtObject);
rtDefineMethod (MyObject, suspend);
rtDefineMethod (MyObject, resume);

// Implement suspend/resume c++ functions
rtError MyObject::suspend()
{
  // suspend your app from active state
}

rtError MyObject::resume()
{
  // resume your app from suspend state
}
  • No labels