Fix send image with camera
This commit is contained in:
parent
a37024d3c7
commit
d9cea544df
1 changed files with 2 additions and 1 deletions
|
@ -22,6 +22,7 @@ import java.io.ByteArrayInputStream;
|
|||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.security.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
@ -634,7 +635,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
private void pickImage() {
|
||||
List<Intent> cameraIntents = new ArrayList<Intent>();
|
||||
Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
File file = new File(Environment.getExternalStorageDirectory(), getString(R.string.temp_photo_name) + Calendar.getInstance().getTime());
|
||||
File file = new File(Environment.getExternalStorageDirectory(), getString(R.string.temp_photo_name_with_date).replace("%s", String.valueOf(System.currentTimeMillis())));
|
||||
imageToUploadUri = Uri.fromFile(file);
|
||||
captureIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageToUploadUri);
|
||||
cameraIntents.add(captureIntent);
|
||||
|
|
Loading…
Reference in a new issue