Using .NET to call an Ionic app to read bar codes

Hi All,

I have a requirement to develop an application that uses the camera in the iPad and iPhones to read bar codes from a product and pass that information to a web based application developed using the .NET framework. The current design uses Ionic to framework to develop the the application that uses the iPad and iPhone camera to capture the bar code details and pass the bar code number to the .NET web application.

Does anyone know to call the Ionic application from .NET framework ? I read that the common practice is to write a Web API call to call the Ionic application, is there any tutorials or examples of how this can be done ? I’m new to the Ionic framework and have very little experience with it and I hope someone can help me out here.



Hey welcome to the forums :smile:

If you want to make requests from Ionic out to a server, which in your case would be the web api that is already written, you can create a service in Angular which uses $http to make http requests (GET, POST, DELETE, etc).

Here is a good tutorial for that:

I’m not too familiar with .NET and what you are working with, but what I would do is make a POST request to an endpoint, and I would include the picture data in that request. The picture data would come from the cordovaCamera plugin, and I believe there a plugin for bar code scanners which you could use.

The endpoint would accept POST requests and it would handle what happens next with that picture data, whether it be saving it to a DB or sending it to another part of the application.

Does that make sense?

Thanks Danny, I’ll have a look at the example and see how to apply it to the project that I’m working on.

For read bar codes and store its information into database using Ionic + .Net. You need to do following steps.

  1. Create API to store information into database. (Use .Net Web API to design API)
  2. Use $cordovaBarcodeScanner plugins to read barcode in ionic application.
  3. Read barcode and call Web API using services and send information to web API
  4. API will save information into database

helpful articles.

Barcode plugins -
Simple Example to call web API -