This sample will show you how to print from your smartphone or tablet using Google Cloud Print (login required).
Requirements:
1 - Google GMail account.
2 - The web browser you use MUST allow popups.
3 - Internet connection.
4 - A Printer connected to Google Cloud Print (Follow these instructions to add a Cloud-Ready Printer or a Classic Printer.
5 - Google Chrome installed on your desktop/laptop to do the initial printer setup.
After you have setup your printer, just compile and run the attached project.
This sample project is a simplified version that will allow you to print directly from your app to any printer added to the Cloud Print service, the sample includes some of the types of documents that can be printed, for other types (such as Google Docs) read THIS document (bottom of the page).
Limitations:
* If you use Chrome this sample will work on devices running ICS or higher, also, some devices with custom ROMs might fail too.
I tried to use a WebView but it didn't work, that's why I'm using the browser.
If someone finds a way to do it using a WebView or a better way, please share the knowledge.
Thanks
UPDATE (Nov 26, 2013): There's a better alternative to this method using a library, see THIS thread.
Requirements:
1 - Google GMail account.
2 - The web browser you use MUST allow popups.
3 - Internet connection.
4 - A Printer connected to Google Cloud Print (Follow these instructions to add a Cloud-Ready Printer or a Classic Printer.
5 - Google Chrome installed on your desktop/laptop to do the initial printer setup.
After you have setup your printer, just compile and run the attached project.
This sample project is a simplified version that will allow you to print directly from your app to any printer added to the Cloud Print service, the sample includes some of the types of documents that can be printed, for other types (such as Google Docs) read THIS document (bottom of the page).
Limitations:
* If you use Chrome this sample will work on devices running ICS or higher, also, some devices with custom ROMs might fail too.
I tried to use a WebView but it didn't work, that's why I'm using the browser.
If someone finds a way to do it using a WebView or a better way, please share the knowledge.
Thanks
UPDATE (Nov 26, 2013): There's a better alternative to this method using a library, see THIS thread.
Attachments
Last edited: