×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Mar 2013
    Posts
    11

    Question How to detect that Tap+Send setting is disabled or enabled [WP8]

    Hi,

    I'm building an application using NFC for Windows Phone 8,
    I want to know if the user enabled using Tap+Send from Device settings or not.

    How can I detect that?

  2. #2
    Registered User
    Join Date
    Apr 2013
    Posts
    14

    Re: How to detect that Tap+Send setting is disabled or enabled [WP8]

    Hi,

    Changing device setting through an app in WP8 is not possible. However, when you tap two WP8 devices and their Tap+Send setting is on , they will create a NFC communication channel that can be detected by a sound which appears when the devices are in proximity. By that sound you can detect whether Tap+Send for the device is enabled or not.

  3. #3
    Regular Contributor
    Join Date
    Aug 2012
    Location
    Rhine Valley
    Posts
    78

    Re: How to detect that Tap+Send setting is disabled or enabled [WP8]

    Hi Ahmed,

    the following blog entry details on how to detect the tap and send state

    How to detect if NFC is enabled on Windows Phone 8 devices


    I'm a bit late with this hint but I just saw your question. Hope it helps, anyway.

    Cheers,
    Thomas

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2011
    Location
    Portugal
    Posts
    919

    Re: How to detect that Tap+Send setting is disabled or enabled [WP8]

    Quote Originally Posted by AhmedRBasuony View Post
    Hi,

    I'm building an application using NFC for Windows Phone 8,
    I want to know if the user enabled using Tap+Send from Device settings or not.

    How can I detect that?

    Hi Ahmed,

    Did Influencer solution worked for you?

    As the article he referenced, in order to detect if the NFC sensor is ready to be usd you can do a simple test:

    Code:
    var nfcDevice  = Windows.Networking.Proximity.ProximityDevice.GetDefault();
    if (nfcDevice != null) { // You are ready to use it
    }
    else {   // The device is not enabled
    }
    For this to work you need to add the ID_CAP_PROXIMITY and ID_CAP_NETWORKING capability to your app. To do that, on Solution Explorer, select Properties and then double click the WMAppManifest.xml file. A properties windows should come up.

    If your app requires a device with NFC to function properly, you can also select on the Manifest Properties the ID_REQ_NFC option. That will prevent users with devices that does not support NFC to install your app. I would not recommend it dough. I prefer to warn the user about the need for the NFC device but having him / her to install my app anyway.
    Last edited by joaocardoso; 2013-06-07 at 14:51.

  5. #5
    Regular Contributor
    Join Date
    Aug 2012
    Location
    Rhine Valley
    Posts
    78

    Re: How to detect that Tap+Send setting is disabled or enabled [WP8]

    Quote Originally Posted by joaocardoso View Post
    For this to work you need to add the ID_CAP_PROXIMITY and ID_CAP_NETWORKING capability to your app.
    João,

    prove me wrong, but I think ID_CAP_NETWORKING is NOT necessary per se. I have an app in store that can copy data via NFC to another device running the same app without having network capability.

    Thomas

  6. #6
    Registered User
    Join Date
    Sep 2013
    Posts
    1

    Re: How to detect that Tap+Send setting is disabled or enabled [WP8]

    Quote Originally Posted by influencer View Post
    Hi Ahmed,

    the following blog entry details on how to detect the tap and send state

    How to detect if NFC is enabled on Windows Phone 8 devices

    I'm a bit late with this hint but I just saw your question. Hope it helps, anyway.

    Cheers,
    Thomas

    Thanks for the info, but this article explains how to detect if the phone has a NFC device, not about detecting the state.

    The article explains that there is no way of detecting the NFC enabled state:

    Currently (Apr 2013) there is no public API on WP8 for third-party developers to check if “Tap+Send” is switched on or off. If the setting is switched off, Proximity API will behave as if it is working properly without exceptions, but both publish and subscribe requests will be ignored without notification. This could cause your customers confusion. - See more at: http://developer.nokia.com/Blogs/Cod....Q3LULpb4.dpuf

    Would be so nice if this could be added to the API, should be possible because the native sharing functionality let's you know if NFC is not enabled

  7. #7
    Regular Contributor
    Join Date
    Aug 2012
    Location
    Rhine Valley
    Posts
    78

    Re: How to detect that Tap+Send setting is disabled or enabled [WP8]

    Yes, we should check UserVoice if there is a wish to improve the NFC APIs...

  8. #8
    Registered User
    Join Date
    Sep 2013
    Posts
    1

    Re: How to detect that Tap+Send setting is disabled or enabled [WP8]

    I just think this

  9. #9
    Registered User
    Join Date
    Mar 2013
    Posts
    11

    Re: How to detect that Tap+Send setting is disabled or enabled [WP8]

    Thank you all for your reply,

    Regarding the answer to my question, I agree with @RobDaPraia2 reply

    Currently (Apr 2013) there is no public API on WP8 for third-party developers to check if “Tap+Send” is switched on or off.
    Best regards,

    Ahmed Rashad

Similar Threads

  1. Replies: 3
    Last Post: 2008-08-25, 12:56
  2. Replies: 0
    Last Post: 2008-08-20, 12:48
  3. Installed MIDlet is disabled on 6230i, but enabled on 6230
    By ieising in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2005-08-23, 18:27
  4. Replies: 1
    Last Post: 2002-12-27, 08:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •