Reputation: 5495
My code
PrintHelper photoPrinter = new PrintHelper(MainActivity.this);
photoPrinter.setScaleMode(PrintHelper.SCALE_MODE_FIT);
Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
R.drawable.ic_launcher);
photoPrinter.printBitmap("droids.jpg - test print", bitmap);
When this code is executed nothing happens. Should I see like a dialog for this or something?
Thanks.
Upvotes: 1
Views: 820
Reputation: 56
Yes, you should see a dialog in which you can select print settings and then perform a print. However, you'll need to first install a print service plugin from the Play Store, like HP Print Service Plugin. Make sure you enable the plugin after you install it - it is disabled by default. Additionally, your Android version needs to be Kit Kat or higher.
Upvotes: 3