Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Accessing CapacitorKV from App

Open
#103 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Domain
mobile-dev

Research direction

Start by reviewing the appStateChange entry point and the CapacitorKV access path, then compare them with the App API work referenced in #99. Done means determining whether CapacitorKV can be accessed during appStateChange and documenting the supported approach or limitation.

Written by the indexing model from the issue text.

Description

Hey,
I'm working on implementing a background task and need it to stop running when the app is in the foreground.
Using an event dispatch when the app goes into the background doesn't work because there's no active runner when the appStateChange event triggers.

It seems to me that the simplest solution would be to use CapacitorKV to set the state during the appStateChange event to handle this. Is this possible? I couldn't find any information on this in the documentation.
I've seen that #99 would allow to access the App-API, but it would be great to have a solution until it gets merged.

Dominant language
C
Stars
57
Forks
37
Avg merge
3d 17h
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ionic-team/capacitor-background-runner

All issues in ionic-team/capacitor-background-runner

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.