0

I have the image's path and I'd like to caLL the native viewer from android, because the user want's the option of zoom and rotate the image. I have to make it by hard or I can call an native Intent?

LeandroC
  • 131
  • 3
  • 13
  • see my answer http://stackoverflow.com/questions/16710066/android-how-to-scale-move-rotate-the-imageviews-on-a-imageview/16711222#16711222 – Chintan Rathod Jul 17 '13 at 11:21

1 Answers1

0

To call the native viwer :

Intent i = new Intent(Intent.ACTION_VIEW); 
i.setDataAndType(Uri.fromFile(new File(path)), "image/jpg");

PackageManager packageManager = getPackageManager();
List<ResolveInfo> activities = packageManager.queryIntentActivities(i, 0);
boolean isIntentSafe = activities.size() > 0;

// Start an activity if it's safe
if (isIntentSafe) {
    startActivity(i);
}
LeandroC
  • 131
  • 3
  • 13