Fix Android blocking overlay not triggering during block session (Pixel 9a, Android 16)

Posted last month

Worldwide

Summary

React Native (Expo) app blocker. Blocking logic spans two custom Expo modules written in Kotlin, plus a JS layer in the main Expo app that listens to native events and drives the runtime permission flow. The fix likely touches both sides — Kotlin AND JS. The previous contract failed partly because the freelancer would not cross the Kotlin/JS boundary. ------------------------------------------------------------ UPDATE (June 4) — what's already shipped ------------------------------------------------------------ This is the final missing piece of a fix already 80% landed. You are NOT building a feature from scratch. Three merged fixes: 1. Alarm timing under Doze — replaces setAlarmClock() with setExactAndAllowWhileIdle(), adds SCHEDULE_EXACT_ALARM to the manifest, emits onExactAlarmPermissionMissing. 2. JS-side runtime permission prompt — listens onExactAlarmPermissionMissing, redirects user to ACTION_REQUEST_SCHEDULE_EXACT_ALARM system UI. 3. AccessibilityService listener recheck fix attempt — handles the reused BlockingCallback instance case where addEventListener returns false. ------------------------------------------------------------ THE REMAINING BUG ------------------------------------------------------------ Despite the three fixes above, the blocking overlay does NOT appear at session start on Pixel 9a (Android 16) with all permissions granted via system UI: - Accessibility service: enabled - Display over other apps: granted - Schedule exact alarms: granted (via the new prompt) - Notification: granted ------------------------------------------------------------ ACCEPTANCE (Gherkin) ------------------------------------------------------------ Feature: Blocking overlay appears reliably at session start Background: Given the user has granted all required permissions via the system UI | permission | | Accessibility service | | Display over other apps | | Schedule exact alarms | | Notifications | And no ADB commands are used in any scenario below And the app is installed via Play Store track or built APK (fresh install) Scenario: Block session starts now, blocked app opened afterwards Given no active block session When the user creates a block session starting now for app X And the user opens app X Then the blocking overlay appears on top of app X within 30 seconds Scenario: Block session starts now, blocked app already in foreground Given the user has app X open in the foreground And no active block session When the user creates a block session starting now for app X Then the blocking overlay appears on top of app X within 30 seconds And the user does not need to switch apps to trigger it Scenario: Scheduled block session triggers at a future time, app opened after Given a block session is scheduled for HH:MM (5 minutes in the future) And the device screen is locked between now and HH:MM When time reaches HH:MM And the user unlocks and opens app X Then the blocking overlay appears on top of app X within 30 seconds Scenario: Scheduled block session triggers, app already in foreground at HH:MM Given a block session is scheduled for HH:MM (5 minutes in the future) And the user keeps app X open in the foreground from now until HH:MM When time reaches HH:MM Then the blocking overlay appears on top of app X within 30 seconds And the user does not need to switch apps to trigger it Scenario: Recurring daily session triggers next day after deep Doze Given a daily block session is scheduled at HH:MM And the device has gone through a full overnight Doze deep sleep (screen off, no charging, no movement, no notifications) When time reaches HH:MM the following day And the user opens app X Then the blocking overlay appears on top of app X within 30 seconds ------------------------------------------------------------ DELIVERABLES ------------------------------------------------------------ - PR with the fix, CI green, short rationale in the description. - 1-paragraph root cause writeup. - Screen recording on YOUR Android device showing the full end-user flow: fresh install OR app data wipe → grant permissions via system UI ONLY (no ADB) → set blocking session HH+5min for a specific app → overlay appears on the blocked app within 30 seconds. ------------------------------------------------------------ VERIFICATION ------------------------------------------------------------ I replicate the same flow on my Pixel 9a Android 16 before milestone release. Demonstrations using ADB to grant permissions or bypass system UI will not be accepted as proof. ------------------------------------------------------------ STACK ------------------------------------------------------------ Kotlin, AccessibilityService, AlarmManager (setExactAndAllowWhileIdle), WorkManager, Sentry Android SDK 7.x, Expo Modules API, React Native / TypeScript on the JS side. ------------------------------------------------------------ TO APPLY ------------------------------------------------------------ Include in your proposal: 1. Your Android device model + Android version, AND confirmation you are comfortable working across Kotlin (native modules) and TypeScript (JS layer in the host app). This is a cross-boundary job, not Kotlin-only. 2. Your hypothesis on the missing piece given the three fixes above (one sentence, BEFORE seeing logs or code).

  • $50.00

    Fixed-price
  • Expert
    Experience Level
  • Remote Job
  • One-time project
    Project Type
Skills and Expertise
Mandatory skills
Kotlin
React Native
Android
Activity on this job
  • Proposals:10 to 15
  • Last viewed by client:4 weeks ago
  • Hires:
    2
  • Interviewing:
    2
  • Invites sent:
    0
  • Unanswered invites:
    0
About the client
Member since Jan 24, 2016
  • France
    Paris3:04 PM
  • $1.3K total spent
    16 hires, 0 active
  • 52 hours

Explore similar jobs on Upwork

How it works

  • Post a job icon
    Create your free profile
    Highlight your skills and experience, show your portfolio, and set your ideal pay rate.
  • Talent comes to you icon
    Work the way you want
    Apply for jobs, create easy-to-by projects, or access exclusive opportunities that come to you.
  • Payment simplified icon
    Get paid securely
    From contract to payment, we help you work safely and get paid securely.
Want to get started? Create a profile

About Upwork

  • Rating is 4.9 out of 5.
    4.9/5
    (Average rating of clients by professionals)
  • G2 2021
    #1 freelance platform
  • 49,000+
    Signed contract every week
  • $2.3B
    Freelancers earned on Upwork in 2020

Find the best freelance jobs

Growing your career is as easy as creating a free profile and finding work like this that fits your skills.

Trusted by

  • Microsoft Logo
  • Airbnb Logo
  • Bissell Logo
  • GoDaddy Logo