Using Motorola EMDK in an ASP.NET application - asp.net-2.0

Is this possible? We have WinForms (CF) apps which use the EMDK, and would like to do the same in an ASP.NET app. All of the code samples provided with the EMDK distro are WinForms. I assume you'd need some sort of ActiveX wrapper around the EMDK assemblies?

There is no need to wrap anything you can use the scanner by Javascript.
They provide some samples using scanner with Javascript for the use of Pocket Browser, you can combine the provided Javascript with asp.net to start the scanner and __doPostBack to the server.
Download samples and pocket browser from: http://support.symbol.com/support/search.do?cmd=displayKC&externalId=12548

Related

Can i use Node.js in my Asp.net Web Application?

I have a Asp.net Application (forms). I want to add video chat feature using webrtc! this video chat application is working on node.js! how can i integrate this webrtc app to my asp.net application ?
Try WebSync, a realtime HTTP streaming (comet) server built for Microsoft stack (.net/iis) using the Bayeus protocol. Search "websync" part in this comment, for "just" an example!
You just need to download their samples; try a simple text-chat sample; and use it for signaling. Simple!
Note: Usually WebRTC developers use node.js for signaling purpose only; however a few people use it to keep sessions to detect presence of the users; if the app you referenced is using such kind of things; then WebSync is not easier because you've to change a lot many things on the server end. Then I'll suggest you try something like this. And obviously iisnode!

Is it possible to create web application using Qt?

How to create web application using Qt?
This depends on what you mean by "web application". If you mean an application that can show parts of a web page in its interface as rendered HTML, like a browser can...yes. Qt incorporates something called QtWebKit:
http://doc.qt.io/qt-5/qtwebkit-index.html
(Note: Back in the olden days it was Microsoft--I think--who first made an embeddable Internet Explorer control so that you could fetch a URL into the midst of some MFC or VB application and run a browser in the midst of your otherwise-form-based application. The event hooks for Microsoft's solution sucked, Qt's are much better.)
Anyway, this is great if you want people to install your application on their machine, where it fetches web data but takes advantages of native features to be richer than a browser could. But be careful because these days native apps have to be really outstanding to surpass the advantage of something that runs in a browser they already have.
HOWEVER If you are trying to use QtCore to push server-side content out and fulfill web requests, that'll be an uphill battle. You might find some related examples if you look hard enough:
https://web.archive.org/web/20100922075100/http://labs.qt.nokia.com/2006/12/20/whats-this-cgi/
Very few people use C++ (much less Qt) to generate web pages server-side. Yet there are still some doing it, even in pretty cool ways:
http://www.webtoolkit.eu/wt
...regardless, QtCreator will be no help in that kind of pursuit.
The functionality you are asking for does not exist within Qt itself. However, there exists (at least) one third party library that allows some of the Qt code for a desktop app to be re-used to a certain extent for serving up a web app:
http://cutelyst.org/
However, this does not magically allow you to write a QML interface with QML Widgets and have a visual interface accessible via a web browser.
What do you mean by "web application"? Is it a desktop app with web features? If so, yes Qt in general is very good for that.
If you mean a kind of server that outputs HTML, then you should use something else because you would have to reinvent many wheels to make it work.
You'd require to run or embed web server. It would be more whise to turn to a Apache Web Server or Apache Tomcat based approach. Otherwhise you'd run somewhat against the odds.
Consider also using some HTTP server library like libonion or Wt. Wt is close in spirit to Qt. However, you won't use Qt itself. libonion is lower level (and you may want to use browser-side Web frameworks like e.g. JQuery or AngularJS with it).
If you already have some Web server, you could consider developing some FastCGI application in C++.
You surely need a good understanding of HTTP protocol and of HTML5 & AJAX.
Since this is 11 years old, I thought I'd come here to tell you that it does indeed seem possible now that qt supports webassembly. The newest version, 6.4 (newest version as of today jan 31 2023), now offers support for webassembly and their website has various examples of apps built with qt that run in the browser.
https://www.qt.io/qt-examples-for-webassembly

Create web application to scan document

work on asp.net 08 C#.I would like to develop a web application that scan documents into the following format(pdf,tiff,jpg,gif.etc) .My scanned images/file will be at client computer.
Have you tried using an 3rd party scanning control such as LeadTools? I have used those controls in the past and worked wonderfully.
Brining in a scanned document through the browser goes beyond the basic functionality of the browser.
If you must stick with ASP.NET, you might consider writing an ActiveX control (IE only, I think) that can handle the scanning and interact with your web page.
You might also consider Silverlight. Although I don't think it can handle the scanning directly, you should be able to interface with COM components installed on the system to handle scanned streams.
The wording is sort of ambiguous. Is the scanner on your side or the client's side? I understand that the result of the scan is saved on your client's side.
I assume that the scanner is on the client's side...
You can't access peripherals [ie: a scanner] via standard JavaScript... You can take advantage of ActiveX for IE only.
Why not write a small winforms application in c# and let your client download that?
By the way, if the client has a scanner on his/her side, the scanner will likely have come with software to manipulate the scanner...

ASP.NET: Record Sound From A Web App?

I'm contemplating adding a voice recording to some posts on my site. I'm wondering if there is an ASP.NET library out there that will allow me to:
Press a button to start recording
Record what I'm saying through my comp's built in microphone
Save the file as a .wav or some other popular sound file
As of now, I will be the sole user of this function, but it would still be nice to have in my bag of tricks in case I want to pull it out later for a client.
It is not doable without the help of a plugin. Browsers simply don't support voice recording.
You could choose from:
Make a SilverLight applet.
The flashPlayer can record too.
find a java Applet that can do this.
Make an activeX Plugin (since you have affinity to asp)
use your os provided voice recorder, save the file and upload it. Playback via browser is easy
You solution will involve a flash componet (outside of rendering the markup that invokes the flash component). The ASP.NET stack won't be able to do it. Silverlight doesn't seem able to do it.
Here is how.
Here's the problem: the browser does not allow this level of hardware access by an application. You could however achieve this either through Java, Flash or ActiveX (Yuk! don't do it) should the end user allow the access to occur however there are a number of cavaets. Here's a great thread where like-minded people like yourself are approaching the same challenge:
http://drupal.org/node/69242
If I were cornered to do this I would create a signed Java Applet.
not directly from asp.net since asp.net is server side and you need access to the client side microphone - however the new adobe flash player has the ability to access the mircophone so in theory you could use flash to record then upload to your site.
See ListenUp sdk. I found a bulletin board called english-test.net that is using the sdk to post voices.
You'll need some client-side code to achieve this as regular HTML doesn't support audio input and upload.
The ActiveX control Active Audio Record 2.0 claims to support recording audio and uploading it to an ASP.NET web server. I've never tried it though.

How to use C# with AIR?

I have some basic experience in making Flex sites, but I think I have more use for Flex in making a desktop AIR application.
Anyway, I was wondering if it is at least possible to use C# alongside Actionscript/AIR? I can't find any example of this.
Also, can I use custom Flash components in a Flex app? I know I can use Javascript components.
Thanks
Your options with AIR are limited to HTML/JS, Flash/ActionScript or Flex. There's no support for other languages and frameworks.
You can create a C# console application and call this application from AIR.
var file:File = File.applicationDirectory;
file = file.resolvePath("CSharpConsoleApplication.exe");
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = file;
nativeProcessStartupInfo.arguments.push("-arg");
var process:NativeProcess = new NativeProcess();
process.addEventListener(NativeProcessExitEvent.EXIT,onProcessDone);
process.start(nativeProcessStartupInfo);
In this way we have a C# application with AIR interface.
Slukse is correct -- it depends on what you mean by "alongside."
Obviously you can't compile C# code into a SWF -- that much we know. But you can certainly embed (as davr suggests) an ActiveX control into a .NET Forms app, load the SWF into that control, and use the ExternalInterface API to bridge the C# code running in the desktop app and the ActionScript code running in the SWF. If by alongside you mean writing server-side C# code to render data consumable by the Flex app, then of course, you can do that, too -- there's plenty of documentation out there covering how to connect a Flash or Flex (or AIR, by extension) app to Web Services of a variety of flavors, including the relatively new-ish WCF stuff.
Another way to go would be to run a standalone C# desktop app (e.g., a service, console app or the like) and have that app listening over a certain local port -- then have your SWF talk to that app using the Socket classes. I'm doing something like this now (with Java, not C#, but the idea's the same) for a personal project.
If by 'alongside' you mean using c# as middleware to connect to your database (probably SQL Server), or to perform remote calculations then yes you can. You can connect to a c# service using remote objects. The midnight coders produce a product called WebORB that is fairly simple to use. Version 3.4 was a totally free version that should suffice if you are building desktop applications in Air. The next two versions are not free but basically offer no real advantage to you.
The only way I know of doing this is with C# web service programs and the AIR/Flex apps communicate with the web services.
The whole point of AIR is to enable web developers who know AS/JS to be able to easily make desktop applications which are automatically portable to win, linux, and mac. Hence why there is no way to connect it to other languages like C#, C++, etc, since web developers generally don't care about those languages, and if they were used, the app is no longer portable (yes, most languages can be ported to other OS's with some effort, but the point of AIR is that you write whatever you want, and it runs everywhere with no extra work).
If you want to combine C# and Flash, instead of trying to put C# inside AIR, what you should be doing is putting Flash inside a C# app. There are various resources for this on the internets, here is one I found in a quick search: Example: Using the External API with an ActiveX container. When you are searching, make sure it talks about the newer, more advanced ExternalInterface / External API method, and not the oldschool SetVariable/CallFunction/watch method. The newer one is much easier to use & has more features.
Also, yes, you can use custom Flash components inside a Flex app. Generally you just make a SWC inside Flash CS3 (or CS4), and then import that SWC inside Flex Builder (or Flex SDK, or FlashDevelop, or ...)
If you are making the components yourself inside Flash CS3, you should use the Flex Component Kit. It provides some features for you, and puts in the boilerplate code, to make your flash component play nice inside Flex. It's included with Flex Builder/Flex SDK.

Resources