Sanniv Khare 8 min read

Android 17 QPR2: USSD limits, self-broadcasts and API 37.2

Android 17 QPR2: USSD limits, self-broadcasts and API 37.2

Android 17 QPR2 is a minor SDK release (API 37.1 to 37.2, per Google’s API diff) with two changes an app can feel: TelephonyManager.sendUssdRequest() no longer runs call-forwarding codes for apps that hold only CALL_PHONE, and self-broadcasts are delivered differently on every app, whatever its targetSdkVersion. If your app sends USSD, handle the new failure and open the dialer with ACTION_DIAL for call-forwarding codes. If it talks to itself through sendBroadcast(), move that work to WorkManager or a direct call. This post is based on the QPR2 release notes at Beta 7.1 (build CP41.260831.019, 16 Oct 2026), the 37.2 API diff, and the native Android sources of three React Native USSD libraries and React Native 0.88.1, which we unpacked from npm and read.

Why we did this: the banking apps we build for Indian clients use USSD and telephony flows next to the main app, and our React Native Android layer is the part that meets these platform changes first.

Checklist: find sendUssdRequest, add a dialer fallback, test on Beta 7.1

The short version for a team with a release before December.

When QPR2 reaches stable

Google has not published a date. The QPR2 notes are at Beta 7.1 (16 October 2026) and QPR3 is already at Beta 4 (12 November 2026), which suggests QPR2 is close. Last year’s QPR2 went stable with the December Pixel update, so early December is a reasonable guess from the pattern, not an announced date. We will update this post when it ships.

What changes, in one table

Change Who is affected What the platform does What to change Source
Minor SDK release, API 37.1 to 37.2 Apps that want the new APIs 18 packages added, about 52 changed Nothing, unless you use a 37.2 API API diff summary
sendUssdRequest() with call-forwarding codes Apps that send USSD with only CALL_PHONE Blocked in the background; the app gets a USSD_ERROR_NOT_ALLOWED failure Handle the failure; pre-fill the dialer with ACTION_DIAL QPR2 release notes
Call-forwarding codes typed in the system dialer Users A new OS confirmation dialog Tell users in your help text QPR2 release notes
Other USSD (balance checks, mobile money) Apps using USSD for these Unaffected Nothing QPR2 release notes
Self-broadcasts All apps, any targetSdkVersion Sending one does not raise process importance or keep a cached process from freezing; undelivered ones are lost if the process dies Use WorkManager, AlarmManager or a direct call for work that must happen QPR2 release notes
android.telephony API changes Telephony apps 1 class added (CarrierConfigManager.OpportunisticNetwork); CarrierConfigManager, DisconnectCause, TelephonyManager changed Read the per-class diff if you use them android.telephony diff
android.os API changes Haptics, version checks 5 VibrationEffect classes added (Builder, Envelope, Event, Preset, VibrationParseException); Build.VERSION_CODES_FULL changed Optional android.os diff

The release notes say the update has “no planned behavior changes”, and then list the two above. Treat both as behaviour changes in your test plan.

The added packages in 37.2 include android.app.personalcontext (and its hint, insight and understander sub-packages), android.app.contentsafety, android.security.authenticationpolicy, android.app.time and android.os.multisensory. None of them changes existing code; they matter only if you adopt them.

USSD: what breaks and where

The rule is narrow. Only call-forwarding codes are blocked, only through sendUssdRequest(), and only for apps that rely on CALL_PHONE without an exempted role. The standard GSM call-forwarding service codes are 21 (unconditional), 61 (no reply), 62 (not reachable), 67 (busy), 002 (all) and 004 (all conditional), as in **21*<number># or ##002#.

Balance checks and mobile-money menus keep working. For our Indian banking clients that means a *99# flow is out of scope; a “forward calls to the branch number” helper is not.

We looked at how React Native apps usually reach USSD. We ran npm pack on the libraries that come up for “ussd” on npm and searched their Android sources:

Search results for sendUssdRequest and ACTION_ intents in three React Native USSD libraries

Real output from our test machine, trimmed to the matches.

  • react-native-ussd 1.1.1 (and its fork @oration/react-native-ussd 1.0.0) call sendUssdRequest() and pass the raw failure code to JavaScript as "USSD request failed with code: <n>". Its permission check asks for CALL_PHONE and READ_PHONE_STATE, neither of which is an exempted role.
  • react-native-ussd-ext 1.0.10 does the same and sends failureCode as a string in a ussdFailureEvent.
  • react-native-ussd-dial 0.0.17 fires Intent.ACTION_CALL. That path is the system dialer, not sendUssdRequest(), so on QPR2 the user will see the new confirmation dialog for call-forwarding codes.
  • None of them knows USSD_ERROR_NOT_ALLOWED or falls back to ACTION_DIAL.

So on QPR2 a call-forwarding request from these libraries will fail with a number your JavaScript layer has never seen, and the user gets nothing.

The fix: classify, then hand over to the dialer

The failure callback before and after adding a dialer fallback

Left: the shape of the library code today. Right: what we add in our own native module.

// Treat this as a starting point and compile it against your target.
private val forwardingServiceCodes = setOf("21", "61", "62", "67", "002", "004")

fun isCallForwarding(code: String): Boolean {
    // **21*number#, *21#, #21#, *#21#, ##21# ... -> "21"
    val body = code.trimStart('*', '#')
    val service = body.takeWhile { it.isDigit() }
    return service in forwardingServiceCodes
}

fun openDialer(context: Context, code: String) {
    // fromParts encodes '#' so the dialer receives the whole code
    val uri = Uri.fromParts("tel", code, null)
    val intent = Intent(Intent.ACTION_DIAL, uri)
        .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
    context.startActivity(intent)
}

Three decisions behind it:

  1. Route call-forwarding codes to the dialer before you even try. The release notes name ACTION_DIAL as the path for apps without an exempted role. Doing it up front avoids a failed request and works on every Android version.
  2. Keep sendUssdRequest() for everything else. Balance and menu codes are unaffected.
  3. Map failure codes in native code, not in JavaScript. Give JavaScript a named reason (notAllowed, networkError) so the UI can explain it. Once you compile against the 37.2 SDK you can compare against TelephonyManager.USSD_ERROR_NOT_ALLOWED directly; until then the dialer-first rule above already covers the blocked case.

ACTION_DIAL needs no permission. It shows the code in the dialer and the user presses call, which is also the honest UX for changing where their calls go.

Self-broadcasts: check what you rely on

A self-broadcast is one where every receiver lives in the sending process. On QPR2 Google delivers these more efficiently, and that has three side effects listed in the notes: sending one does not raise your process’s importance, it does not stop a cached process from being frozen, and if the process is killed, undelivered self-broadcasts are lost and not redelivered. This applies to all apps regardless of targetSdkVersion, so it lands with the OS update, not with your next release.

Code that is fine: a broadcast that only refreshes UI state while the app is in the foreground. Code to change: anything that uses sendBroadcast() to itself to kick off work that must finish, such as “sync after payment” or “upload logs”, especially from the background. Use WorkManager for deferrable work, AlarmManager for exact times, or call the code directly.

We searched the Android sources of React Native 0.88.1 (748 Java and Kotlin files), @react-native-firebase/messaging 27.1.1 and react-native-background-fetch 4.4.2 for sendBroadcast(, sendOrderedBroadcast and LocalBroadcastManager: 0 matches. React Native’s only registerReceiver call is the dev-menu reload receiver in DevSupportManagerBase.kt, which is a debug feature. So for a typical React Native app, the code to check is your own native modules and any SDK that ships as a compiled AAR (Notifee and background-fetch both include one, which a source search cannot see).

# Run from your Android project root
grep -rn --include=*.kt --include=*.java \
  -E "sendBroadcast\(|sendOrderedBroadcast|LocalBroadcastManager" app/src

Do you need to change compileSdk or targetSdk?

No, not for the two changes above. The USSD rule and the self-broadcast change apply to apps on QPR2 devices whatever they target. You only need the 37.2 SDK to call the new APIs or reference the new constant. AGP 9.5 and 9.6 both list API 37 as the highest level they support (AGP 9.6 notes); check your AGP’s release notes before you point compileSdk at a minor release.

What to check on your own app

  1. Search native code and node_modules/*/android for sendUssdRequest, ACTION_CALL with a tel: USSD code, and sendBroadcast(.
  2. For each USSD code your app can send, decide: call-forwarding (dialer) or not (keep the API).
  3. Install Android 17 QPR2 Beta 7.1 on a test phone or emulator image and run each USSD flow and each background job once.
  4. Make sure JavaScript shows a message for a failed USSD request instead of silently doing nothing.

We will update this post with the stable build and date when QPR2 ships.

Made by the team behind this post

Apps from our studio

  • Goes with this post

    BMDB.fun

    Your Bollywood world at a glance, with links straight to the OTT app that streams each film.

    Android TV · Web · Mobile

    Get
  • Nix

    The Mac uninstaller that finds what the Trash leaves behind: caches, logs, derived data and saved states.

    macOS

    Get
  • Cardigami

    Pop-up greeting cards that rise out of the fold on iPhone Duo.

    iPhone · App Store

    Get
  • OneClick QuitAll

    Quit every running app in one click. See memory and CPU first.

    macOS · Mac App Store

    Get

Need this built? Let’s talk.

We build and run apps for Mac, TV, mobile and the web, and write about what we learn.