[FR]: Add MemoryBudgetManager sample
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
Research direction
Start with the specified sample path, then read the official App memory budgets guide linked in the issue. Implement the listed telemetry, budget transitions, lifecycle-aware listener and cache eviction, and document the manifest clauses and adb inspection commands. Confirm the sample demonstrates the API and its release-only usage; pull request #515 is already open.
Written by the indexing model from the issue text.
Description
Is there an existing FR for this?
- I have searched the existing issues
For which area is this FR?
General
Is it for a specific sample?
samples/performance/memory/src/main/java/com/example/platform/performance/memory/MemoryBudgetSample.kt
Describe the feature request
Add a sample module (:samples:performance:memory) demonstrating the Android 17 QPR2 (API level 37.2 / CINNAMON_BUN_2) MemoryBudgetManager API and <memory-budget> manifest declarations, following the official App memory budgets guide.
Scope:
- On-demand memory usage and budget telemetry (
processCurrentUsageBytes,packageCurrentUsageBytes,processBudgetBytes,packageBudgetBytes, andLIMIT_IS_DISABLED). - Discrete workload budget transitions (
processBudgetBytes,clearProcessBudget(), idempotency, andIllegalArgumentExceptionceiling validation). - Lifecycle-aware
OnOverBudgetListenerregistration (ON_START/ON_STOP) with fast, allocation-free high-yieldLruCache<String, Bitmap>eviction. - Documentation for
<memory-budget>manifest clauses, release-only usage, andadbinspection commands (dumpsys meminfoanddumpsys activity processes).
Code of Conduct
- I agree to follow this project's Code of Conduct
- Dominant language
- Kotlin
- Stars
- 1.8k
- Forks
- 554
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from android/platform-samples
-
[Bug]:Openbug
Difficulty 5/5 Over a week Newbie friendliness 3/100
android/platform-samples#517 ·
-
[Bug]:Openbug
Difficulty 5/5 Over a week Newbie friendliness 1/100
android/platform-samples#512 ·
-
[FR]:Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 5/100
android/platform-samples#421 ·
-
[FR]: oppoa5sOpenenhancement
Difficulty 5/5 Over a week Newbie friendliness 15/100
android/platform-samples#417 ·
-
[Bug]:Openbug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
android/platform-samples#416 ·
All issues in android/platform-samples
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
MetrolistGroup/Metrolist#5426 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
🐛 Type:Bug 📥 State:Awaiting Assignment 🚨 Priority: P0 - Critical
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
micronizationlab/glafira-ai-hub#785 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sorsama/deepseek-harness-mobile#154 ·
Maintainers usually reply within 1 day
-
0. Needs triage enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day