ギャラリーのような別のアプリで画像を開くにはどうすればよいですか?Androidインテント画像
このように意図する必要がありますか?
Intent in=new Intent("intent?");
startActivity(in);
ギャラリーのような別のアプリで画像を開くにはどうすればよいですか?Androidインテント画像
このように意図する必要がありますか?
Intent in=new Intent("intent?");
startActivity(in);
これは、画像/ pngを表示するためのAndroidのインテントを作成します。
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File(path)), "image/png");
startActivity(intent);
ファイルがプライベートサンドボックスではなくすべてのユーザーに表示されていることを確認してください。それをデータフォルダのsdcardに保存するのは一般的です。 /sdcard/data/appname/filename.png
使用[Androidの組み込みのギャラリーアプリで画像を開いて、プログラム]のこの
intent.setData(android.Provider.MediaStore.Images.Media.Data);
可能重複(http://stackoverflow.com/questions/2169649 /オープン画像インアンドロイド内蔵型ギャラリー-APP-プログラム) – MByD
チェックアウト[本] [1] [1]:http://stackoverflow.com/questions/ 2169649/open-an-image-in-inside-gallery-app-programmatically –
チェクアウト[this] [1] [1]:http://stackoverflow.com/questions/2169649/open-an-image-in-androids-built-in-gallery-app-programmatically –