Hi,
I am launching the VideoCamera activity from my main activity but not
able to get a callback to read the file created. Does anyone have an
example on how to do this?
This is what I have:
public class Video extends Activity {
private static final int VIDEO = 1;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Fill view from resource
setContentView(R.layout.main);
VideoView video = (VideoView) findViewById(R.id.video);
// Start camera or video recorder
Intent intent = new Intent();
intent.setClassName("com.android.camera",
"com.android.camera.VideoCamera");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivityForResult(intent, VIDEO );
}
@Override
public void onActivityResult (int requestCode, int resultCode, Intent
data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == Activity.RESULT_OK) {
Uri uri =
data.getParcelableExtra("android.intent.extra.STREAM");
Log.i("ReturnedFromVideo", uri.toString());
}
}
}
In the manifest I had:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.example.video"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon"
android:label="@string/app_name">
<activity android:name=".Video"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="video/*" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="3" />
</manifest>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---