Module: Toybox::Application

Overview

The Application module contains the base class for every Connect IQ app.

The Application Module includes the AppBase class which is responsible for controlling the app life cycle. This module also includes set and get methods to control the settings and properties values held in the Object Store and a GOAL_TYPE enum that defines the different goal types that can be triggered.

See Also:

Since:

  • 1.0.0

Defined Under Namespace

Modules: Properties, Storage Classes: AppBase, AudioContentProviderApp, ObjectStoreAccessException

Constant Summary

GOAL_TYPE_STEPS = 0

Since:

  • 1.3.0

GOAL_TYPE_FLOORS_CLIMBED = 1

Since:

  • 1.3.0

GOAL_TYPE_ACTIVE_MINUTES = 2

Since:

  • 1.3.0

Instance Method Summary collapse

Instance Method Details

getAppToybox::Application::AppBase

Retrieve the AppBase Object that is currently running.

Returns:

Since:

  • 1.0.0


1785
1786
# File 'Monkeybrains.rb', line 1785

def getApp()
end

loadResource(resource) ⇒ Toybox::WatchUi::FontResource, ...

Load a resource from the executable.

defined in the project's resources.xml file

Examples:

Loading a Bitmap resource

// The resources.xml file contents:
// <resources>
//     <string id="AppName">APEELingApp</string>
// </resources>
using Toybox.WatchUi;

banana = Application.loadResource(Rez.Strings.AppName);

Parameters:

Returns:

Since:

  • 3.1.0


2377
2378
# File 'Monkeybrains.rb', line 2377

def loadResource(resource)
end