I have a first release of the app on the Play store now:
https://play.google.com/store/apps/details?id=lhsi.mcd
There is a rudimentary ability to crop images on it. After selecting an image to use for the card art, it sends it to the built in crop function of the Android camera to crop to the right size. There have been issues with this (as using the built in camera crop is not recommended as it is an undocumented feature), so there should be a fail safe where it will just use the image selected before cropping. My plan going forward is to find a cropping library and use that, but it will take a little bit longer to sort out.
Showing posts with label magic. Show all posts
Showing posts with label magic. Show all posts
Wednesday, 5 March 2014
Tuesday, 14 January 2014
Image Share
After looking around on StackOverflow a couple of times, I finally got the ability to share an image file working.
This is the code snippet that works - saveCard is a File that I have just saved and checked that it exists():
Intent share = new Intent( Intent.ACTION_SEND );
share.setType( "image/jpeg" );
share.putExtra( Intent.EXTRA_STREAM, Uri.fromFile( saveCard ) );
startActivity( Intent.createChooser( share, "Share Image" ) );
This, on the other hand, is my previous code that wasn't working:
Intent share = new Intent( Intent.ACTION_SEND );
share.setType( "image/jpeg" );
share.putExtra( Intent.EXTRA_STREAM, saveCard.toUri() );
startActivity( Intent.createChooser( share, "Share Image" ) );
For some reason, the toUri method on File doesn't work in this case. In any case, I'm glad I got it fixed :-)
This is the code snippet that works - saveCard is a File that I have just saved and checked that it exists():
Intent share = new Intent( Intent.ACTION_SEND );
share.setType( "image/jpeg" );
share.putExtra( Intent.EXTRA_STREAM, Uri.fromFile( saveCard ) );
startActivity( Intent.createChooser( share, "Share Image" ) );
This, on the other hand, is my previous code that wasn't working:
Intent share = new Intent( Intent.ACTION_SEND );
share.setType( "image/jpeg" );
share.putExtra( Intent.EXTRA_STREAM, saveCard.toUri() );
startActivity( Intent.createChooser( share, "Share Image" ) );
For some reason, the toUri method on File doesn't work in this case. In any case, I'm glad I got it fixed :-)
Subscribe to:
Posts (Atom)