androidprintingandroid-4.3-jelly-bean

Print support in Android 4.3 Jelly Bean


Programming an App for a device that runs Jelly Bean 4.3.

Our App makes a photo, does some processing and then must print on a (dye-sublimation) WiFi photo printer. (Possibly the Canon Selphy CP910.)

I am stuck how to best approach to printing of the photo. I have a couple of questions.

  1. Is it correct that Jelly Bean offers no support for printing at all? KitKat offers the [Printer] class. Jelly Bean offers nothing at all? Or am I missing something?
  2. Is there something on GitHub that would help (but that I have not been able to find)?
  3. If there is no support for printing, what is the best solution?
  4. Is it possible to send an Intent to the Canon Printer App (Easy Photo-Print) which would take it from there?
  5. The only solution I can think of is to save the photo as a JPG file. then exit our App, then start Canon EPP and find the photo to print. There must be a better way, right?
  6. If saving the photo as a JPG is the only solution, where I do save it in order for Canon EPP to find it? External storage does not seem to work. It appears that EPP can not find a photo there...

Solution

  • After hacking into phonegap, this works:

    final Intent sharingIntent = new Intent( "android.intent.action.SEND" );
    sharingIntent.setPackage("jp.co.canon.bsd.android.aepp.activity");
    sharingIntent.setType("image/jpeg");
    sharingIntent.putExtra(Intent.EXTRA_STREAM, printUri);   
    startActivity(Intent.createChooser(sharingIntent, "Print Photo"));
    

    where printUri is a Uri to a JPEG file on external storage.

    If you need another printer manufacturer, the phonegap source lists quite a few.