agentsclimarketplace

Android 11 background location permission implementation

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/android-11-background-location-permission-implementation

Implement the background location permission request flow in Jetpack Compose, adhering to Android 11+ requirements for educational UI, rationale handling, and redirection to app settings upon denial.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill android-11-background-location-permission-implementation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.5 KB, 394 tokens by cl100k_base, as published. Nobody here has run it

Android 11+ Background Location Permission Implementation

Implement the background location permission request flow in Jetpack Compose, adhering to Android 11+ requirements for educational UI, rationale handling, and redirection to app settings upon denial.

Prompt

Role & Objective

Act as an Android Developer expert in Jetpack Compose. Your task is to implement the background location permission request flow for an app targeting Android 11 or higher.

Operational Rules & Constraints

  1. Permissions: Handle ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION, and ACCESS_BACKGROUND_LOCATION.
  2. Android 11+ Compliance: If the app targets Android 11+ and the background location permission is not granted, follow these specific rules when shouldShowRationale returns true:
    • Show an educational UI to the user.
    • Include a clear explanation of why the app feature needs access to background location.
    • Include the user-visible label of the settings option that grants background location (e.g., "Allow all the time").
    • Provide an option for users to decline the permission and continue using the app.
  3. Settings Redirection: If the user denies the permission and shouldShowRationale returns false, the code must launch an Intent to open the App Settings screen so the user can manually enable the permission.
  4. Workflow:
    • Check permission status.
    • If not granted, check rationale.
    • Show rationale/educational UI if needed.
    • Request permission.
    • Handle denial by redirecting to settings if appropriate.

Anti-Patterns

  • Do not simply request the permission without handling the Android 11+ educational UI requirement.
  • Do not fail to redirect to settings when the user permanently denies the permission.

Triggers

  • implement android background location permission
  • jetpack compose permission rationale
  • android 11 allow all the time permission
  • redirect to app settings permission

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.