How to print receipts on BLE Thermal Printers for a Xamarin Forms mobile app? - mobile

I am totally new to the bluetooth world and I am current using Xamarin Forms framework to build an app which providing the feature of receipt printing on BLE printer (Currently using Mustek MK380 Thermal Printer as test device).
I am using this plugin for my app, and has been able to connect to my printer with no issue:
https://github.com/xabre/xamarin-bluetooth-le
However, I am still confused and have no idea what to do next in spite of the research I did (To understand what characteristics, services, etc are). I have played around with the plugin and also gone through the Services, Characteristics and Descriptors by log their names and values at console.
Could anyone help me or provide me some directions, or there are alternatives for my to achieve what I want, it is much appreciate if there are examples to refer.
In short, my remarks and questions are as below:
I wish to develop a Xamarin Forms app that support POS style receipt printing feature through thermal printer.
The printer I use is Mustek MK380 Thermal Printer supporting BLE 4.0
I am using https://github.com/xabre/xamarin-bluetooth-le plugin
I am stucked after connecting to the printer.
Thank you!

Related

LabVIEW - mobile applications

As far as I am concerned and what I've already implemented there is a way to cooperate somehow with mobile apps such as sending some instructions between mobile and LabVIEW instruments but...
Is there any way to implement mobile application with LabVIEW ?
I suppose that officially not, but what about some external frameworks such as LabVIEW hacker toolkit ?
I've never seen anything that allows you to create native apps. The usual solutions other than data dashboard are using web technologies:
Write a html page that LabVIEW can host that can load on the mobile device and use http or websockets for communications. There are some toolkits to automate this for example LabSocket (though not sure how much mobile testing is done with it).
Remote viewing technologies. I saw one the other day called wezarp which works on mobile.
All of these depending on a Windows based application that you are talking too though. I'm afraid natively I don't think anything exists and would be very hard to implement as you would need to play with the LabVIEW compiler to cross-compile to objective-c, java or javascript.
There was a way: NI LabVIEW mobile module which worked for windows mobile. You would program an app in LabVIEW, compile it and load onto your Windows phone. I recollect it worked pretty stable. The solution is not recommended for new projects
For dashboard style panels, there is Data Dashboard for LabVIEW Android smartphone version allows you to view only. (tablet version allows you to exercise limited control options) Also available for iPhone.
Something available here for select devices only

Take a photo in WPF using the default camera app in Windows 8

I was asked to develop a software in vb.net and one of it's features should be the possibility to take photos on a tablet PC. I already played around with the MediaCapture API which returns me a photo, but as it seems that it's not possible to show a preview or anything else outside of ModernUI apps. It's just pure photo capturing.
I thought for a little while how this problem could be solved. I got some inspiration from my Android phone then. My idea was to call some sort of API to open up the regular Windows 8 camera app in ModernUI mode, let the user take the photo and then receiving that through a "return value", just like you usually do it in Android apps.
Now my question is, if there is a way to start up the Windows 8 default camera app, let it take a photo and receive that back into my WPF desktop application.
I could develop my software as ModernUI app as well, but I never did that and it also seems like you must publish it over the web store then, but I only want to use that inside my company.
My other (simple stupid) idea would be to ask the user to open the camera app by himself, take some photos and come back to my software later. I could then receive the images from the folder they were stored in. I guess that would work as well, but I don't really like that idea because it's not very intuitive and seems just stupid.
If you have an idea (or an alternative), I would be really happy if you could share it with me.
Thanks in advance!
Unfortunately, there are no .NET classes that allow you to access a webcam or integrated camera on your computer. This means that you have to take a look at the native Windows API and call it from your application. I cannot point you to the right methods that you have to use, as I just have used Microsoft Media Foundation to capture a continuous stream of images from a webcam and encode it to a video file.
There are some sites that encapsulate this native functionality in .NET classes, but I don't know if they are good or not:
http://dotnet.dzone.com/articles/using-webcam-wpf-application
http://www.yiigo.com/guides/vbnet/how-to-process-image.shtml
(just google for more if you'd like to).
In Windows Store Apps, this task can be performed relatively easy with the media capture API you've mentioned. You can also side-load Windows Store Apps if you have Windows 8 Pro or Enterprise - then you do not have to publish your app in the Windows Store.
If you have any further questions, please feel free to ask.

Desktop silverlight App bluetooth and WP7

I'm new on working with Bluetooth and I need some help.
I have an application written in silverlight 4 that is running in my PC. The objective now is to get contactList or contact information from a Windows phone (Mango) via Bluetooth. I've searching the web and found no convincing answers about this. So, is it posible to obtain that information via bluetooth?? If not, is there any easy workaround??
thanks for the help
Bye,
No, it's not possible. Use custom web server for communication between phone and PC.
Via bluethooth is not open is not possible as of now. May be in future if Micosoft opens the Bluetooth API's to do so, then it may be possible.
For tasks related to Bluetooth settings you can use Settings tasks with type as Bluetooth settings.

Supporing Arabic in WP7

I am planning to write a twitter app for Windows phone 7 with supporting Arabic, RTL with complex scripting, and with Arabic keyboard layout like the one in this app as this langauge is not supported by WP7.
I tried looking for a resources to help with this porcess but couldnt find any.
So does anyone have an idea on how the complex scripting can be rendered in WP7 through apps?
regards,
I saw a demo on a Windows Phone lately. Arabic text is shown normally in internet explorer and even SMS! But user can not write Arabic in the current moment as the Windows Phone 7 now is not supporting it. But People in Redmond promised it will be available in next language package updates! May be you should let Arabic supporting feature for the next version of your application.
About the app you pointed as example, I believe they have made their own custom keyboard! So you might contact the company developed the application and ask them for keyboard if it is available as 3rd party component.

Are ActiveX applets dead?

Are ActiveX applets as a technology supported by Microsoft dead?
What are the alternatives to ActiveX to create extremely rich internet applications using Microsoft Technologies? (Silverlight does not cut it for me, as it doesnt give me access to serial ports - or does it?)
You can of course still make ActiveX applications, but know that they will only work with Internet Explorer, unless users of other browsers install hosting plugins, that aren't all that good anyway.
In either case, a web application that requires access to a serial port? Are you sure you're not better off with a desktop application instead? A simple refresh and you've cut off that serial port.
Not all applications belong in the browser.
If you want to launch an application via a web browser that can access the serial ports, one option would be to use Java Web Start with JavaFX as the rich interface API, and Java Communications for the serial port access. You could end up with a cross-platform application at the end as well.
Or just write a native application using your favoured Windows toolkit if you absolutely are restricted to using Microsoft tools.
ActiveX as technology is very much alive, and will remain for many years to come. But its usage for Internet is dead. ActiveX is to be only used from within windows stand-alone applications.
ActiveX as of 2015 is a dead technology that even the maker is no longer interested in continuing to use it. Here is something to read.
No, Silverlight is designed from the ground up to be completely sandboxed, no way to bypasss that (thank god).
If you need that kind of access, but are looking for an easy deployment, I would suggest building a Clickonce application.
There are restrictions, because I think by default they are not full trust, but that's the best you will get.
It's also going to be the only easy route if you need printing (unless you are willing to round-trip to a server to generate a PDF file).
If you need direct access to some hardware (like for a POS software with cash drawer, receipt printer etc), you need to go "desktop". Clickonce can give you some deployment options, XBAPs can give you the "browser experience", but you are going to have to make compromises based on what your "hardware access needs" are.
EDIT:
I didn't notice the Silverlight exclusion in the original question. My comment it not really applicable. Sorry!
I don't know that I would call ActiveX dead just yet, but I would be cautious if you are planning to build an application based upon this technology. My recommendation would be to use Silverlight. This provides much of the functionality that is commonly desired in ActiveX controls, but uses the newer .NET technologies.
There is alot of talk about using Silverlight for media playback, but it has many powerful feature that can also be used to create Line-of-Business applications as well. In fact there is a great podcast episode on DotNetRocks that discusses this exact subject.
Here are a few more links that might point you in the right direction:
Microsoft Silverlight Getting Started
Silverlight 2 and a Glimpse of Silverlight 3 by Scott Guthrie
To the best of my knowledge, Silverlight 4 still doesn't give you direct access to serial ports, but it does give you access to any local web cam and microphones now. You could presumably also run Silverlight 4 out-of-browser, which gives you access to COM objects, and you could write a quick-and-dirty COM object which wrapped serial port access. That said, I also agree with what folks said above about not all applications belonging in the browser.

Resources