Print in android - android

How to print from android tablet without using any apps provided by android play Store.
I would like to print from webview just by clicking one button in my activity. So for example, if i click print button in my activity , it should just print the current content of webview without asking / taking me to settings options.

Android has no built-in printing support, so unless you mean printing to an OutputStream, this is not possible. Which means you still need some Google Play apps, like PrinterShare or Cloud Print.
Short answer: Not possible

If I can add something.. the new Android ships with a built-in printing framework, as stated on the Android 4.4 page.
Android now includes a complete framework that allows users to print any document using a printer connected over Wi-Fi, Bluetooth, or other services. The system handles the transaction between an app that wants to print a document and the services that deliver print jobs to a printer. The android.print framework provides all the APIs necessary to specify a print document and deliver it to the system for printing. Which APIs you actually need for a given print job depends on your content.
The bad news is that it's only for API 19 and later. So if you're targeting >= Android 4.4 versions (1.8% to date, according to Androiddistribution.com) just stick with the API.

Android direct USB printing using OTG cable is available through a small library.
see link http://myhowtohelp.blogspot.in/2014/01/library-to-print-from-android-device-usb.html

Related

How do I transfer messages from iPhone to Android like Samsung Smart Switch and Google transfer?

I want to build an app to transfer message history between iOS and Android.
Apple does not allow third party apps to access messages, but Samsung Smart Switch circumvents this by using either phone-to-phone USB connection or by accessing iCloud. Google phone transfer seems to do a similar thing.
How do these apps make this possible and is this something third party developers can do?
I don't think you can transfer things over like that from Android to Apple iPhone unless they give you the option when you are first setting up the iPhone to transfer contents over from android and it also transfers the messages.
Another option though it's been a long time since I have used an Android device. You could use something like https://messages.google.com/web to load up your android messages from your phone and possibly just export them and save them to your computer.
As for developing such a tool, working within the messages API for apple. I think you can only develop extensions or addons but can't directly access the content for security reasons. Without further research, the companies might be only allowing the company to do this via a contract between them, but would not let a 3rd party vendor such as you or I access this data.
https://developer.apple.com/app-store/review/guidelines/
Nowhere in the guidelines does it specify that you can't access the SMSes. But you can only access it if you use private methods which are not allowed and will get your app rejected.
You can only access data for which Apple supplies a documented API. You can not access files outside of the Sandbox of your App unless Apple provides an API for it.

How to restrict/disable print service(s) in Android?

I am trying to achieve a use case where on installing an app, all print services barring one would get disabled on the Android device.
To achieve this, I looked into Android's Device Administration API capabilities but that doesn't fulfill the use case. I also looked into Google's Android for Work framework and arrived at the following observations / possible solutions -
By setting up managed profiles (work profile): This was introduced from Android 5.0 but can only manage the listed/enterprise controlled and has no control over other apps as mentioned in the below links -
https://developers.google.com/android/work/build-dpc
https://developer.android.com/work/managed-profiles.html
By writing a Device Policy Controller (DPC) app: To achieve the specific use-case the DPC would have to run as the device owner in which case the provisioning needs to be done via NFC and is not straightforward. Also, this scenario is generally meant for corporate owned, single use (COSU) devices.
So my questions/doubts here are -
Is there any straightforward way in which this use case can be achieved?
Is this even achievable as it violates the Android Security model?
You should write your custom DPC. Right now you can do provisioning using several methods. If you have devices which use Android 7 and above you can use QR code provisioning which is quite convenient. For this purpose you can upload your dpc apk to a remote server and write information about the server, application DeviceAdminReceiver and apk checksum to QR code (you can take this QR code as example).
You can check to google awesome project TestDPC which will give your deep understanding of what is DPC and how can you use it.
You can read more about provisioning methods in android documentation. Also if you can contact the manufacturer of devices you can ask him to preinstall your custom dpc.
It is achievable and doesn't violate Android Security model because during provisioning your dpc app it get Device Owner (root). So you can do anything without any restrictions. Here you can check device owner API and possibilities. Also take a look at TestDPC source code and you will understand that nothing is impossible with Device owner mode :)

zebra printing on ICS, intents and license

We are developing a new App for internal use that will rely on a RW420 Zebra printer for POS printing. I have been looking for documentation on the issue and I still have three questions I have not been able to resolve:
a) Pricing: Is there any amount to pay for using the SDK on a commercial app?. We are developing it on behalf of our final client. I have been able to download the SDK from their page at no cost but still have concerns over it.
b) ICS support: It seems the SDK has not been evolved since 2.1/2.2 Android releases. Will this be an issue?. Currently it is possible to use the Zebra App under ICS, but don't want to go deeper on programming just to see all the efforts have been futile.
c) Do I really need the SDK or is it possible to use an intent (found nothing about it)?
If you have another similar printer suggestion to substitute the Zebra, I will be delighted to know about it.
No. [1] AFAIK no, but contact them if you want to be super sure.
No, ICS should be completely backwards-compatible with well programmed Android 2.1/2.2 applications and libraries.
In order for an Intent to work, the user would already have to have some ZebraLink Android application installed on their device in order for that to process the intent. There is an app "Zebra Utilities" but it does not have an Intent you can use to print. [2] AFAIK there is no such application, so no.
Sources: [1] & [2] see the comments by OTisler (Zebra employee).

Android - How to print from an Android device?

I want to have a print feature in my Android application.Also,my application may cater to varied users and I do not want them to do any pc configurations for the same.Also,I do not know what type of printers they may use.Kindly provide me some knowledge in this regard or how to implement this.
Android SDK has no Printer Api still. we have to use Third party apis best of them is Google Cloud Print.
You can simply pass pdf file to PrintDialogActivity which in sample..., it will be printed from any where but before that your printer must be registered with Google Cloud Servers.
Go through below links
Google cloud print Sample:
https://developers.google.com/cloud-print/docs/android
How to register:
http://support.google.com/cloudprint/bin/answer.py?hl=en&answer=1686197&p=mgmt_classic
How it works:
http://www.google.com/cloudprint/learn/howitworks.html
Help:
http://support.google.com/cloudprint/?hl=en&p=mkt_support_faq
https://developers.google.com/cloud-print/docs/android
Great news!
In Android 4.4 (API level 19) and higher, the framework provides
services for printing images and documents directly from Android
applications.
https://developer.android.com/training/printing/index.html

Printing API in Android

I've downloaded a utility called PrintShare which allows one to print things like web pages, contact lists, calendars, etc to a printer connected through wireless or a computer participating on the PrintShare network.
I would like to have my Android app create a text file, then send that text file to a printer that is shared with PrintShare.
Is there an API for printing on Android?
Thanks
Mike
All which need a printing API in Android should vote for it.
http://code.google.com/p/android/issues/detail?id=1148
http://code.google.com/p/android/issues/detail?id=13275
Currently there are some bad working third party apps. Nothing is a professional solution.
From Android 4.4 provided API Printing
http://developer.android.com/training/printing/index.html
http://www.youtube.com/watch?v=Iub67ic87KI
Is there an API for printing on Android?
Not natively. There might be some from third parties, but nothing built into the OS.
Android 4.4 and higher has a printing API that you can use.
Bixolon is a company that sells printers of all types. In fact, it sells printers that can connect with Android applications by an API (SDK).
Here some real example:
http://www.youtube.com/watch?v=op_j80zVL78
And here more information about it (Bixolon SPP-R200)
Android: Connecting and Printing to Bixolon SPP-R200
If anyone knows another company or printers, please share!
Thanks
Checkout out www.lob.com, they have a nice printing and mailing API that is easy to integrate with Android!
Android now includes a complete framework that allows users to print any document using a printer connected over Wi-Fi, Bluetooth, or other services. The system handles the transaction between an app that wants to print a document and the services that deliver print jobs to a printer. The android.print framework provides all the APIs necessary to specify a print document and deliver it to the system for printing. Which APIs you actually need for a given print job depends on your content.
Kindly refer to the following url:
https://developer.android.com/reference/android/print/package-summary.html

Categories

Resources