How to print from Chrome on mobile web app? - javascript

I have a web app where users can create invoices. I would like users to able to print tags/labels that the web app generates directly from their phones.
I will only be supporting the latest phones. A Chrome Mobile & Android only solution is perfectly acceptable.
I've looked into Google Cloud Printing but, and please correct me if I'm wrong, the gmail account must be the same for the user and the printer in order to print. I would need ~5 users to be able to print from the same printer.
What are the best practicing regarding mobile printing from web apps?

Related

loading any web site to an electron desktop app and manipulate it

I have to build a multiplataform desktop app that loads any website that I want inside the desktop app, I dont want to open my google chrome or firefox.
Researching I came across Electron. It is possible to this in electron?
If it is possible, do I have any control over the web site, for example, can I spot all the forms and complete them with dummy data?

can you access the google now api & cards from an API?

I have a little project where I want to display google now cards in a browser (Chrome) window. If you have android phone I pretty much want to replicate the google now desktop gadget but on a browser using javascript/html etc
Is the google now api available for this sort of stuff? I cant see it.

Mobile Web application running when screen is off?

I'm considering building a mobile Web application, using Jquery Mobile that will be used to track truck delivery.
I want to be able to periodically send gps coordinates back to the server? Can this be done if the screen is off?
If not can some alternate approaches be suggested..
If you are good in javascript and html you can go for phonegap. this framework will work like a native application and running from webview like browser. Since phonegap is a cross platform framework you can make your app compatible to many devices like windows phone, Apple, Android. To know more about phonegap or cordova click here
And yes phonegap does many function or features that can customize your application in many way. for example "WAKE LOCK" which keeps your application awake till you force close it.
or if you are using browser you can not run your code for long since browser is a big application android or your mobile system will close it.

Print Web page on 4 inch printer from mobile

I am developing a mobile web application. On the form when the user press Print button I need to print the page on a 4 inch printer.
My question is how can I connect to the printer from the mobile web browser(may be using bluetooth, USB).
My application will be running on all type of smart phones(Andriod , IOS, Windows, BB etc).
Unfortunately android and ios lack the concept of a printer driver so there is no native and widely supported way to print from mobile devices.
However there are a couple of other options to consider:
Rely on the user to have an app installed for their preferred printer (this probably is not a satisfactory solution as these apps often integrate poorly with mobile web browsers)
Target the (fairly common) printers which support email printing, that is allow the users to enter the email address for their printer and then send an email to that address containing whatever it is that you wish to print (for anything other than plaintext you will need to send a multipart email with html content)
The easiest thing to do is use a service like Google Cloud Print.
Once the user has completed the action on the app (iPhone, Android, BB) or web browser, you can then submit the data to a printer of your choice. There is full documentation available.
Unfortunately not all the printers are supported by Android.
But if you have a back-end, get a wifi printer and print it using the wifi-printing preferences from the back-end, trigger of course is from the mobile.
This seems like a better fit:
Use a print server - a separate computer that accepts simple printing messages from your app. The print server can house the drivers for the printer and take care of rendering. You can write a small service application to listen for jobs from the app.
Android wasn't designed to talk to printers.
try iprintmarvel printer it is very easy to integrate with android/java mobiles
Use javascript to print the page from browser, but your phone must be connected to a printer.
Just try this line of code on any button click event.
window.print();

Using JavaScript in my web app to delete files on the user's smart phone

I'm a software developer from Germany and I have a special problem concerning smart phones, websites and security!
My web application - which is optimized for smart phones - allowes it to upload photo files (made by the smart phone camera) up to our webserver.
(I use the regular HTML File Control.)
It works fine!
But now we think about possibilities to delete the uploaded photos on the smart phone - via the web app!
Is there any chance to realize that?
Our users work with Firefox 17.0 for Android.
Maybe Mozilla offers proprietary JavaScript code to get access to the local smart phone devices ... ?
Or is there any possibility to change the local security settings of Firefox Mobile?
If both solutions can't be realized, could I develop a smart phone app (which is locally installed) that deletes the photos on the phone? I'm sure I could!
But then I need a possibility to start the app using my website code.
So I have the same security problem - I think so ... again I need a way to "leave" my website to get access to local devices via JavaScript or something else (to start the installed app on the phone).
Is there anybody who has an idea?
Thanks in advance.
Thomas

Categories