私のアプリケーションでは、ギャラリーを開いて写真を選択し、画像ビューで画像を表示してから、Bluetooth 経由で送信することになっています。
それが私が到達したものです:
Uri selectedImage = data.getData();
String[] filePathColumn = {MediaStore.Images.Media.DATA};
Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
String filePath = cursor.getString(columnIndex);
cursor.close();
Bitmap yourSelectedImage = BitmapFactory.decodeFile(filePath);
iv.setImageBitmap(yourSelectedImage);
Bluetooth経由で送信する方法は?
NB Bluetooth を開いて、他のデバイスからも検出できるようにしました。あなたが私の課題で私を助けてくれたら、私は感謝します=]