0

私は自分の仕事を達成するためにこの答えに従っています。最後の部分を除いてすべてがうまく機能し、

if(result!=null)
{

    Toast.makeText(getApplicationContext(), "Image saved in Gallery !", Toast.LENGTH_LONG).show();

    if(isinint) //check if any app cares for the result
    {
        Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND, Uri.fromFile(new File(result.toString()))); //Create a new intent. First parameter means that you want to send the file. The second parameter is the URI pointing to a file on the sd card. (openprev has the datatype File)

        ((Activity) ImageListActivity.this).setResult(Activity.RESULT_OK, shareIntent); //set the file/intent as result
        ((Activity) ImageListActivity.this).finish(); //close your application and get back to the requesting application like GMail and WhatsApp
        return; //do not execute code below, not important
    }
}

最後に何もクラッシュしませんが、壁紙もwhatsappに設定されていません。

なぜ機能しないのか誰か教えてください。

どんな助けでも感謝します。

ありがとう

4

1 に答える 1