-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows 10 Mobile #221
Comments
I haven't run with with Windows 10 yet, just Windows 8.1 on my Lumia 640. Maybe the API or permissions changed for Windows 10? Are you seeing any error messages in Visual Studio? |
No. And I'm seeing logs that the plugin is successfully recognizing NFC tags. |
It looks like this is a permission issue. I had a Cordova app on the phone before upgrading the phone to Windows 10 and it ran fine after upgrading. It was able to read NFC tags. I recreated the app and deployed from Visual Studio 2015 onto the Windows 10 phone and I got a permission error. To recreate the app I was using for debugging.
edit www/js/index.js and replace
Open Visual Studio, switch the project to CordovaApp.Windows10 (Universal Windows) and deploy to the phone. If you can figure out the correct permissions in Visual Studio, I can update the manifest to do this automatically. |
I saw your code and it appears to be right. I changed plugin.xml to add this: <config-file target="package.appxmanifest" parent="/Package/Capabilities">
<DeviceCapability Name="proximity" />
</config-file> Notice that since we are dealing with Universal Apps it makes sense that the target is Still this doesn't work and I'm out of ideas. |
@ruisilva450 I think the trick is to get the generated Windows project to work, then copy those settings back to into cordova.xml. |
any news on this? trying this in Samsung/android - working, Lumia 950 - not working. |
👍 +1 on this issue. I had the same error as @don and I had to add proximity capability manually for win 10 universal app in order to avoid that runtime error. I think you should just add one more line in the plugin.xml. I'll check how I did for another plugin and let u know |
This is working in my plugin.xml - taken from a different plugin not this one - to support windows phone 8.1, windows 8.1 and 10. <platform name="windows">
<config-file target="package.appxmanifest" parent="/Package/Capabilities" versions="8.1.0">
<m2:DeviceCapability Name="bluetooth.rfcomm">
<m2:Device Id="any">
<m2:Function Type="serviceId:00001101-0000-1000-8000-00805F9B34FB"/>
</m2:Device>
</m2:DeviceCapability>
</config-file>
<config-file target="package.appxmanifest" parent="/Package/Capabilities" versions=">8.1.0">
<DeviceCapability Name="bluetooth.rfcomm">
<Device Id="any">
<Function Type="serviceId:00001101-0000-1000-8000-00805F9B34FB"/>
</Device>
</DeviceCapability>
</config-file>
</platform> I know the config-file items seem identical but without declaring it explicitly I was not getting win 10 manifest to be updated... I think it is because of Cordova Windows platform. |
I have the same issue, with nfc.addNdefListener. When i use nfc.addTagDiscoveredListener it detects the tag, but i don't have any information writen on it. |
Which 'DeviceCapability' settings need to be added? bluetooth.rfcomm or proximity or both? Goal: read NFC tags in windows 10 universal apps - especially on windows 10 desktop with nfc reader @lamuertepeluda @ruisilva450 What is needed for windows 10 desktop - Any updates or further findings? What else needs to be done? |
Hi @mobidev111 , I'm sorry I didn't find much time to work on this plugin yet. Anyway I think you should only add See this link and this other link for more info about capabilities. Try if this work (I don't have access to a windows machine a.t.m. so I can't try it myself) by adding it to the <platform name="windows">
<config-file target="package.appxmanifest" parent="/Package/Capabilities" versions="8.1.0">
<DeviceCapability Name="proximity" />
</config-file>
<config-file target="package.appxmanifest" parent="/Package/Capabilities" versions=">8.1.0">
<DeviceCapability Name="proximity" />
</config-file>
</platform> If the section for version=8.1.0 causes problems, remove it and leave the part with version>=8.1.0 which is for Windows 10. |
thx. this works for windows 10 mobile - without this I got the "Access Denied" message as described above (#221 (comment)) Will check for windows 10 desktop. @don can you add this to the plugin? it definitely gets people past the "Access Denied" message on windows 10 mobile. |
FYI: I did not encounter any |
@jwillmer This issue occurs at runtime, not compile time. Tried on Nokia Lumia 1520. |
@lamuertepeluda also tested at runtime. Works as intended 👍 |
Guys, this happened to me just today. I found this after I tried all described on this issue, and still didnt work. The weird thing was also happened the same as @ruisilva450 , he said:
So I was pretty sure NFC was enabled and working as expecting. But some how i just went and tried to see if i was getting subscribed too early (even if i do it ondeviceready). First, I setted a breakpoint on phonegap-nfc.js line 19: Got the addNdefListener breakpoint stop first. Settted a timer to wait a bit until plugin is initialized, and worked fine. Should we create an event, so users can subscribe after plugin is initialzied? Happy Holidays! |
#227 might fix this |
Closing old issue. RIP Windows Mobile. Maybe #265 handles for Windows10? |
@don Miss Windows Mobile so much. RIP. 🍺 |
Hi,
I tried to use your plugin on a Lumia 920 and 950XL and both returned NO_NFC_OR_NFC_DISABLED everytime on
nfc.addNdefListener(callback, [onSuccess], *[onFailure]* );
I have NFC enabled on both devices
Thank you
The text was updated successfully, but these errors were encountered: