2

この質問は他の場所で尋ねられたかもしれませんが、私にはうまくいきませんでした。

app-privateフォルダーに画像を保存すると、ユーザーはそれをAndroidギャラリーに移動することができます。だから私の質問はそれをどのように行うかです?

これは私のコードです

String outPath = "new path which is gallery";
  File outFile = new File(outPath);
  // File (or directory) to be String                                       
sourcePath="image in the app-private folder";
  File file = new File(sourcePath);

   // Destination directory 
    boolean success = file.renameTo(new File(outFile, "name of image"));   
 System.out.println("success: "+success);

ここでの成功は常に「偽」です

4

0 に答える 0