mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
allow using the app at third party video-capture action
This commit is contained in:
@ -78,6 +78,7 @@ public class MainActivity extends AppCompatActivity implements SensorEventListen
|
||||
isVideoCaptureIntent = true;
|
||||
hideToggleModeAbout();
|
||||
preview.trySwitchToVideo();
|
||||
preview.setIsVideoCaptureIntent();
|
||||
shutterBtn.setImageDrawable(getResources().getDrawable(R.mipmap.video_rec));
|
||||
}
|
||||
}
|
||||
@ -397,6 +398,17 @@ public class MainActivity extends AppCompatActivity implements SensorEventListen
|
||||
return orientation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void videoSaved(Uri uri) {
|
||||
if (isVideoCaptureIntent) {
|
||||
final Intent intent = new Intent();
|
||||
intent.setData(uri);
|
||||
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mediaSaved() {
|
||||
if (isImageCaptureIntent) {
|
||||
|
Reference in New Issue
Block a user