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

  • Home
  • SEARCH
  • 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 6050133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:39:17+00:00 2026-05-23T07:39:17+00:00

EDIT: I found the solution, see below My first post on StackOverFlow. However I

  • 0

EDIT: I found the solution, see below

My first post on StackOverFlow. However I have been reading about this problem for a while without a solution that works.

What I would like to do is register the following Intent: android.nfc.action.TAG_DISCOVERED

I am doing the following in my Code:

    IntentFilter filter = new IntentFilter();
    filter.addAction("android.nfc.action.TAG_DISCOVERED");
    filter.addCategory("android.intent.category.DEFAULT");
    Log.d(TAG, "Created the new filter");
    reciever = new NFCBroadcastReciever(this);
    Log.d(TAG, "Created the new Broadcast Reciever");
    this.registerReceiver(reciever, filter);
    Log.d(TAG, "Registered new reciever");

The BroadCastReciever is defined as follows:

public class NFCBroadcastReciever extends BroadcastReceiver {

private Screen screen;
public static String TAG = "NFCBroadcastReciever";

NFCBroadcastReciever(Screen _screen){
    screen = _screen;
}

@Override
public void onReceive(Context context, Intent intent) {

    String action = intent.getAction();
    Log.d(TAG, "Action recieved: "+action);
    if(action != null && NfcAdapter.ACTION_TAG_DISCOVERED.equals(action)){
        paymentScreen.onNewIntent(intent);
    }
}

}

However I get an exception that the intent being fired from a tag read has no corresponding Activity. I would like to be able to only start listening for NFC events at a certain point in my application.

Thanks in advance for your help.

I found the solution to the problem actually, the key to getting NFC events to occur only on a specific activity while it is active and not when other activities are running. The sample in the Android SDK explains it: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.html

  • 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-23T07:39:17+00:00Added an answer on May 23, 2026 at 7:39 am

    I found the solution to the problem actually, the key to getting NFC events to occur only on a specific activity while it is active and not when other activities are running. The sample in the Android SDK explains it: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.html

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

Sidebar

Related Questions

EDIT: This problem has been solved. See below. Hey all. I'm building an iPhone
Solution found, see my comment below D5, odbc to mysql database This code: with
I have found a few libraries to edit MP3 tags (UltraID3Lib is great) but
Edit: This code is fine. I found a logic bug somewhere that doesn't exist
EDIT: This was formerly more explicitly titled: - Best solution to stop Kontiki's KHOST.EXE
EDIT: This question is more about language engineering than C++ itself. I used C++
I found this solution on here How to update strongly typed Html.DropDownList using Jquery
As I have an editor-list, that needs to have additional edit lines, I found
EDIT: I found out that I can get it to compile if I cast
I've found that on some occasions I can edit the source while debugging. Are

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.