Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
Mountain View desk5 min

How to Secure Android Intent Filters Against Spoofed or Unexpected Actions

An Android intent filter routes requests; it does not make them trustworthy. Secure entry points with deliberate export settings, narrow filters, strict validation, and safe intent delegation.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Secure Android intent entry points by limiting which components are exported, keeping intent filters narrow, and validating every delivered action, URI, MIME type, extra, and flag in code. A filter helps Android route implicit intents; it does not authorize a caller or make the payload trustworthy. Treat each exported component as a public interface, and apply the same checks when an activity receives a replacement intent in onNewIntent().

Why an intent filter is not a security boundary

An <intent-filter> advertises which implicit intents a component can handle. Android uses its actions, categories, and data declarations when resolving such intents, but the filter is not authentication or authorization. An explicit intent can name an exported component directly, and an external caller can supply data that does not match the filter. Validate input after delivery, regardless of how the component was reached.

As an Amazon Associate I earn from qualifying purchases.

Android’s guidance is direct: “Don’t export your app’s components unnecessarily.” See Android intent and component security best practices.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose which components other apps can reach

Review activities, services, broadcast receivers, and content providers in the app’s merged manifest, including entries added by libraries. Set android:exported="false" on components that do not need cross-app calls. For a deliberate integration surface, such as a deep-link activity, set android:exported="true" explicitly and treat it as an externally callable API.

#1 Best Overall
Samsung Galaxy A17 5G Smart Phone 128GB US 1 Yr Manufacturer Warranty Black | Large AMOLED, High-Res Camera, Durable Design, Super Fast Charging, Expandable Storage, Circle to Search, 2025
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.

Where an exposed interface handles sensitive operations, consider an appropriate permission; a signature-level permission can suit communication limited to apps signed by the same developer. A permission and an exported setting define who may reach a component, while input validation determines whether a particular request is safe to process. Do not rely on checks inside the component to justify exporting it unnecessarily.

Make filters narrow, then validate the delivered request

Declare only the actions, categories, schemes, hosts, ports, paths, and MIME types the component actually needs. Data matching depends on which elements are present: a scheme-only filter can match URIs with that scheme across hosts and paths, whereas adding an authority and path narrows the match. Consult the Android intents and intent filters guide when defining matching behavior.

Rank #2
Tracfone Motorola Moto G 2025, 64GB, Saphire Blue (Locked to
  • Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Tracfone plan required, activating is easy, just 3 steps.
  • DISPLAY: Immersive viewing on a 6.7-inch super-bright 120Hz display with powerful stereo speakers and Bass Boost for cinematic entertainment.
  • CAMERA SYSTEM: Advanced 50MP Quad Pixel camera captures sharp, detailed photos and videos in any lighting condition
  • PERFORMANCE: Lightning-fast 5G connectivity paired with a powerful processor and RAM Boost for smooth multitasking.
  • BATTERY LIFE: Long-lasting 5000mAh battery with TurboPower charging technology delivers hours of power in minutes.

In application code, check the received action and parse and validate the actual URI. Use allowlists for schemes, hosts, ports, and paths expected by the feature; validate MIME types where relevant. For extras, check that required values exist, have the expected type, and fall within an acceptable range. Handle missing or malformed values safely rather than crashing, and do not assume a serialized Parcelable or Serializable from another app is trustworthy.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Reject invalid input before it can trigger sensitive work or change application state. If an operation can partially modify state, make sure validation failure does not leave it half-completed. Android’s intent redirection guidance also emphasizes that externally supplied intent data must be handled defensively.

Rank #3
Sale
Samsung Galaxy A17 5G Smart Phone 128GB, US 1 Yr Manufacturer Warranty Blue | Large AMOLED, High-Res Camera, Durable Design, Super Fast Charging, Expandable Storage, Circle to Search, 2025
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.

Validate every activity delivery path

An activity may receive its initial request in onCreate() and later receive another through onNewIntent(), depending on its launch mode and how it is started. Put request validation and handling in shared logic so both paths apply the same checks.

  1. In onCreate(): validate the intent supplied to the activity before acting on it.
  2. In onNewIntent(): validate the new intent using that same logic. If later code reads the activity’s stored intent through getIntent(), call setIntent(newIntent) so it refers to the replacement request.

Check for unsupported actions, unexpected URI values, malformed extras, and flags the feature does not need on either path.

Rank #4
Sale
Samsung Galaxy S26 Ultra, Unlocked Android Smartphone, 512GB, Black
  • PRIVACY DISPLAY: Automatically hide your screen from those beside you. The built-in privacy display can be preset¹ to turn on when receiving notifications, typing passwords, or using specific apps
  • TYPE IT IN. TRANSFORM IT FAST: Enhance any shot in seconds on your smartphone by using Photo Assist² with Galaxy AI.³ Add objects, restore details, or apply new styles by simply typing or tapping
  • NIGHTS, CAPTURED CLEARLY: From gigs to city lights, record and capture moments after dark with clarity using Nightography so your photos and videos stay crisp and clear on your Samsung Galaxy
  • MAKE IT. EDIT IT. SHARE IT: Turn everyday moments into something personal with creative tools built right into your mobile phone, whether it’s a special contact photo, custom wallpaper, an invitation or more⁴
  • HELP THAT KEEPS UP: Stay in the moment while Now Nudge with Galaxy AI helps you respond faster and stay organized with smart suggestions⁵ that appear exactly when you need them on your phone

Prevent unsafe intent redirection

Intent redirection occurs when an app launches an intent that an outside caller can influence, often through a nested intent extra or a serialized intent string. Do not forward an untrusted nested intent directly. If redirection is not essential, remove the feature; if it is, construct a fresh destination intent using validated fields and constrain its target and payload.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

AndroidX Core 1.9.0 and later provides IntentSanitizer to allowlist intended components, actions, data, and extras. After sanitizing, check that the resolved destination is the expected package and component. Review grant flags before forwarding: FLAG_GRANT_READ_URI_PERMISSION, FLAG_GRANT_WRITE_URI_PERMISSION, FLAG_GRANT_PERSISTABLE_URI_PERMISSION, and FLAG_GRANT_PREFIX_URI_PERMISSION. Pass a URI permission grant only when the operation requires it, not merely because it arrived on an untrusted intent.

Best Value
Tracfone Moto g Play 2024 Prepaid Phone with a 1-Yr Plan Included
  • Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Activating is easy, just 3 steps.
  • ACTIVATION Promotion: Includes 1500 min, 1500 texts & 1500 MB Data + add more as you need it
  • CAMERA SYSTEM: 50MP Quad Pixel camera. Capture sharper, more vibrant photos day or night with 4x the light sensitivity.
  • PERFORMANCE: Blazing-fast Qualcomm performance. Get the speed you need for great entertainment with a Snapdragon 680 processor and 4GB of RAM.
  • 64GB built-in storage. Get plenty of room for photos, movies, songs, and apps. Made for US
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use explicit service intents and safe PendingIntents

Use explicit intents when starting services so the destination component is specified rather than left to implicit resolution. When creating a PendingIntent, use the creator method for the intended component type and choose FLAG_IMMUTABLE by default.

If a platform feature requires a mutable PendingIntent, such as an inline reply, make its base intent explicit by setting the target component or package. Avoid implicit mutable PendingIntents: another app may be able to supply fill-in fields that change where the eventual operation goes or what it does. When another app needs to invoke an action owned by your app, consider whether a PendingIntent is a safer delegation mechanism than exposing a general-purpose component.

Account for target-SDK-dependent platform behavior

Platform protections vary with the app’s target SDK. They add useful constraints, but they do not replace application-level validation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Target SDK Documented behavior Practical implication
Android 13 (API level 33) or higher External implicit intents delivered to exported components must match the declared filter’s action and category, subject to exceptions including explicit intents, same-app calls, system-originated intents, and root. Keep validating delivered data and account for the documented exceptions; filter matching is not proof of caller identity or payload safety.
Android 14 (API level 34) or higher Implicit intents to internal app components are restricted. Use an explicit intent for an unexported internal target. Export a component only when external invocation is intentional.

Check the Android 13 behavior changes and Android 14 behavior changes for current details and exceptions. Record the app’s target SDK and test supported Android versions, because these rules are target-SDK-sensitive.

A practical review checklist

  • Inspect the merged manifest, including library components, and explicitly set each component’s export status.
  • Keep every exported component’s filters limited to the actions and data it needs; use a permission where sensitive cross-app access requires one.
  • Validate action, URI, MIME type, extras, and relevant flags in code after every delivery.
  • Run the same validation for activity creation and onNewIntent() handling.
  • Do not launch caller-controlled nested intents without sanitizing and checking the destination; do not pass URI grants through without need.
  • Use explicit service intents and immutable PendingIntents unless a specific feature requires mutability; make mutable base intents explicit.
  • Test against the app’s target SDK and supported platform versions, including valid, malformed, missing, and unexpected inputs.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.