Search code examples
androidvideo-capture

Android video recording


hi i have changed my code as below but the problem now is ,the recording wont stop at 2 minutes in samsung galaxy.ohters fine

Intent i = new Intent("android.media.action.VIDEO_CAPTURE");
                                i
                                        .putExtra(
                                                android.provider.MediaStore.EXTRA_OUTPUT,
                                                Uri.fromFile(videofile));
                                i
                                        .putExtra(
                                                android.provider.MediaStore.EXTRA_VIDEO_QUALITY,
                                                0);
                                i.putExtra("android.intent.extra.durationLimit", 120); 
                                startActivityForResult(i, 2);

Solution

  • Since it works on other devices my guess would be that the Samsung camera app doesn't understand/handles that option passed to the activity.