Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7164673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:06:50+00:00 2026-05-28T14:06:50+00:00

I am writing an application that is supposed to detect nfc tag and automatically

  • 0

I am writing an application that is supposed to detect nfc tag and automatically be launched.
I have succeeded in doing so by using TECH_DISCOVERED + filters but I think the better way to do it is by using NDEF_DISCOVERED.
I have added the intent-filter to my manifest but it doesn’t work.
This is my manifest code for the TECH_DISCOVERED, that works:

    <intent-filter>    
    <action android:name="android.nfc.action.TECH_DISCOVERED"/>
    </intent-filter>
    <meta-data android:name="android.nfc.action.TECH_DISCOVERED"    
     android:resource="@xml/nfc_tech_filter" />

when I want to try the NDEF_DISCOVERED i try:

                <intent-filter>    
                <action android:name="android.nfc.action.NDEF_DISCOVERED"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <data android:mimeType="text/plain" />

for the tags, I use ‘Mifare classic 1k’ tags that was written as ‘Smart Poster’ using NFC TagInfo app from the market.

What am I doing wrong?
or, what is another way to make my app be launched and not show the activity selection dialog?

Thanks,
Eran.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:06:51+00:00Added an answer on May 28, 2026 at 2:06 pm

    You are filtering for text/plain and not the URI of the smart poster. Android converts smart posters to URIs, then you have to filter for that URI. You can see the URI in logcat if you check for the intent that is started. For a URI like http://example.com/file, do something like this:

    <intent-filter>
        <action android:name="android.nfc.action.NDEF_DISCOVERED" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="http"
                android:host="example.com"
                android:pathPrefix="/file" />
    </intent-filter>
    

    See the NFC dev guide for more information on how to parse NDEF messages. Please read the entire document to fully understand how to filter for the right intent: http://developer.android.com/guide/topics/nfc/nfc.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a Symbian application using Qt for Symbian that is supposed to run
I've tried writing a simple application thats supposed to detect pixel differences from the
Greetings. I'm writing a web application that is supposed to connect to a SQL
I am writing a PHP application that's supposed to allow users to add certain
I am writing a little application that is supposed to listen for user commands
I'm writing code for an Android application that is supposed to take data, package
I am writing an application that's supposed to support HTML5 drag/drop API for file,
I'm writing a web application that's supposed to be embedded in other people's websites
Im writing an application that supposed to send coordinates in an SMS, but I've
im writing an application that downloads and installs addons for programs which needs to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.