Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IAppResourceQuotas

interface IAppResourceQuotas
Extends com.amazon.apmf.IStandard App resource usage quotas. Quotas may be imposed on system resources like memory, cpu, and cache. This module has APIs to query these quotas. Quotas change based on system load.

Methods

getMemoryBytes()

i64 getMemoryBytes()

Returns

i64 memory quota in bytes of the calling app.

Throws

  • NoQuota — if no limit is set on memory.

getCpuPercent()

i32 getCpuPercent()

Returns

i32 (percentile * 10) cpu quota of the calling app.

Throws

  • NoQuota — if no limit is set on cpu usage.

getCacheStorageBytes()

i64 getCacheStorageBytes()
Informs cache storage quota for the calling app. The system will automatically delete files in this directory as disk space is needed elsewhere on the device. App developers cannot expect cache data to be persisted across restarts of their app even though the OS may not choose to wipe it every time. The system will always delete older files first. Apps are strongly encouraged to keep their usage of cache space below the quota returned.

Returns

i64 storage quota of the calling app in bytes.

Throws

  • NoQuota — if no limit is set on cache usage.

Last modified on October 29, 2026