1

I just completed my Android application which scans NFC tags. When an NFC tag comes near the device, the device tries to show all the apps which can scan the NFC tag.

I want it to remember which app it should use scan the NFC tag. It displayed my app, but I do not want the system to always ask me which app to use.

In my two devices, it not does show any option like Use by default for this action or Always. Why is this so?

Screenshot 1 Screenshot 2

  • In your two devices, what happens if the NFC tag is near your app? Does it open your app? – geffchang Feb 18 '14 at 7:14
  • It shows all the apps list who can scan the NFC and even works well but do not showing like “Use by default for this action” or “Always” so that in next time it wont ask me to select the app – user54016 Feb 18 '14 at 7:24
0

This is because there can be no default handler for all NFC intents. You'd have to create a mimetype for your NFC tag and use that mimetype as the data field for the intent filter.

However, this site doesn't deal with developer issues, so you'd be better off on StackExchange, for example here.

  • well, but this is not the technical question. I know what are the type of question is being asked on the SO that why I posted here. This seems related to the device not any programming. I have issue in two phones and working well in one phone. Request to you to undo the step which you did marking this as off-topic – user54016 Feb 19 '14 at 4:59
  • If I'm guessing correctly, the one device where this works has an older Android version? Those have a different way of resolving NFC intents, and that's why there can be such a checkbox. – onik Feb 19 '14 at 7:10
  • No, That device is new Android version 4.2.2. You have guess wrong and result you closed this question as off-topic that is not right – user54016 Feb 19 '14 at 7:31
0

NFC disovery events that indicate only a certain tag technology (or even only the presence of any tag) are usually too broad to be bound to just one app. It seems that the Android team therefore decided that it should not be possible for one app/activity to take precedence for such an unspecific event.

As a consequence, the only way how this mandatory intent chooser can be avoided is if an NDEF formatted tag is used and if the app's developer registered the app/activity for a more specific NDEF intent (e.g. a URI, an NFC Forum external type or a MIME type).

-1

Someone, or something has set defaults for the application(s), and this default was set as soon as someone or something set it by either internally, or by hitting the button "Always.", in this case you'll have to go to your App Drawer, go into Settings and find your Application Manager. In this case, you'll want to go to the application that doesn't have the option. Find it, click it, go down and hit "Clear Defaults.", now, hit the home button, find the application you're wanting to run and VOILA! The action menu should set itself back. If it doesn't, find the application that is automatically running upon startup of that specific object, and hit clear defaults.

Thank-you, FxApoc.

  • This is not my case, dialog box show the list of all the apps which can scan the NFC tag but issue is that "“Use by default for this action” or “Always” not displaying. If any app is already set as default then above screenshot was not asking the apps to scan the NFC tag. Above screenshot showing two apps which scan scan the NFC – user54016 Feb 18 '14 at 9:09
  • 1
    @TheFxApoc the screenshots show that no default has been set (otherwise you wouldn't see that dialog at all) – GAThrawn Feb 18 '14 at 11:13
-1

Just disable the default app for NFC by searching it in the application list. Post this your custom app will be the default app to run, when you tap NFC Tag and it will execute the task as you configured in the NFC Tag

  • If the "chose" dialog is shown, there obviously is no default app configured – so it cannot be disabled (also see GATrawn's comment on this answer). – Izzy Dec 20 '14 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy