Skip to content
Skillv1.0.0

Android 11+ Background Location Permission Flow

Implement the compliant background location permission request flow for Android 11+ using Jetpack Compose, adhering to official documentation requirements for educational UI and settings redirection.

by David-Li0406(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from David-Li0406/meta-skill-evloving (AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8/android-11-background-location-permission-flow/SKILL.md). Install upstream with npx skills add David-Li0406/meta-skill-evloving --skill android-11-background-location-permission-flow. Copyright stays with the author.

Android 11+ Background Location Permission Flow

Implement the compliant background location permission request flow for Android 11+ using Jetpack Compose, adhering to official documentation requirements for educational UI and settings redirection.

Prompt

Role & Objective

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

Operational Rules & Constraints

  1. Use rememberMultiplePermissionsState to manage permissions including ACCESS_BACKGROUND_LOCATION.
  2. Use LaunchedEffect to trigger permission requests.
  3. Educational UI Requirement: If the app hasn't been granted the ACCESS_BACKGROUND_LOCATION permission and shouldShowRationale() returns true, show an educational UI that includes:
    • A clear explanation of why the app's feature needs access to background location.
    • The user-visible label of the settings option that grants background location (e.g., "Allow all the time").
    • An option for users to decline the permission, allowing them to continue using the app.
  4. Settings Redirection: If the user denies the permission and shouldShowRationale() returns false, direct the user to the app settings to enable the permission manually.
  5. Ensure the code handles the state changes correctly to launch the settings screen when appropriate.

Anti-Patterns

  • Do not simply request the permission without checking the rationale state first.
  • Do not block the user from using the app if they decline the background location permission.

Interaction Workflow

  1. Initialize the permission state.
  2. Check permission status.
  3. Show rationale/educational UI if required.
  4. Request permission.
  5. Redirect to settings if permanently denied.

Triggers

  • implement android 11 background location permission
  • ACCESS_BACKGROUND_LOCATION rationale
  • allow all the time location setting
  • jetpack compose permission settings redirect
  • android background location educational UI

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/david-li0406-meta-skill-evloving-android-11-background-l-2b0310/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

david-li0406-meta-skill-evloving-android-11-background-l-2b0310.ocm.jsonjson
{
  "ocm": "1",
  "id": "david-li0406-meta-skill-evloving-android-11-background-l-2b0310",
  "kind": "skill",
  "name": "Android 11+ Background Location Permission Flow",
  "description": "Implement the compliant background location permission request flow for Android 11+ using Jetpack Compose, adhering to official documentation requirements for educational UI and settings redirection.",
  "publisher": "David-Li0406",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "math"
    ],
    "tags": [
      "skill-md",
      "android",
      "jetpack-compose",
      "permissions",
      "background-location",
      "kotlin",
      "github"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Implement the compliant background location permission request flow for Android 11+ using Jetpack Compose, adhering to official documentation requirements for educational UI and settings redirection."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github",
      "repository": "https://github.com/David-Li0406/meta-skill-evloving",
      "path": "AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8/android-11-background-location-permission-flow/SKILL.md",
      "ref": "ca3a335628981df10c36e00cb9850df2c247ab9a",
      "url": "https://github.com/David-Li0406/meta-skill-evloving/blob/ca3a335628981df10c36e00cb9850df2c247ab9a/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8/android-11-background-location-permission-flow/SKILL.md",
      "key": "David-Li0406/meta-skill-evloving/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8/android-11-background-location-permission-flow/SKILL.md"
    }
  },
  "instructions": "# Android 11+ Background Location Permission Flow\n\nImplement the compliant background location permission request flow for Android 11+ using Jetpack Compose, adhering to official documentation requirements for educational UI and settings redirection.\n\n## Prompt\n\n# Role & Objective\nAct as an Android Developer expert in Jetpack Compose. Your task is to implement the background location permission request flow for apps targeting Android 11 or higher.\n\n# Operational Rules & Constraints\n1. Use `rememberMultiplePermissionsState` to manage permissions including `ACCESS_BACKGROUND_LOCATION`.\n2. Use `L",
  "cost": {
    "context_tokens": 511
  }
}

Fetch it by URL: GET /api/v1/registry/david-li0406-meta-skill-evloving-android-11-background-l-2b0310/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.