1

I’m developing an app using NativeScript + Angular. I need it to have a SignalR connection (SignalR.Net - NOT core) Here is the flow of the app:

  • The app shows a barcode to user1

  • Using the app on another device, user2 scan this barcode

  • On scan- user2 send a https request to my server saying it was scanned

  • Server should tell user2 to show a prompt “it was scanned”

I already have a server that works with SignalR, I just need a way to connect to this server using NativScript + Angular.

If it helps those who have knowledge: There is a package called Nativescript-websockets but I don’t have an idea on how to use it to implement it myself.

Aviv Day
  • 428
  • 4
  • 13
  • The author of that plugin wants to sell his SiganlR implementation so he keeps it in a separate library. It's unfortunate as the last time I attempted to use it the Javascript implementation of SignalR would not work with NativeScript due to the lack of the window object but that was some time back. – tuckerjt07 Apr 18 '20 at 01:20
  • So what can I do to implement it myself? – Aviv Day Apr 18 '20 at 10:20
  • 1
    There are Java and Swift client libraries for SignalR, you will have to use those libraries to build a cross platform plugin. – Manoj Apr 18 '20 at 18:58
  • So you're saying best options it to go with implementing it seperatly for each platform? – Aviv Day Apr 18 '20 at 20:58
  • 1
    Yes, unless you are fluent at web sockets you might be able to patch up websockets plugin with SignalR JS client. In my opinion it's easy to work with native APIs than getting different plugins / libs to work together. – Manoj Apr 19 '20 at 00:41
  • Ok thank you I’ll read and learn how to, will wait to see if someone else have a plug-in or a guide how to use web sockets with Nativescript – Aviv Day Apr 19 '20 at 00:47

0 Answers0