Android从startActivityForResult()调用特定活动?

时间:2013-09-12 13:55:00

标签: android android-intent android-activity

以下是App的Manifest.xml。我想从另一个应用程序调用VideoEditor活动。但它显示了一个选择App的弹出窗口。有没有办法直接调用VideoEditor活动?

Intent passingIntent = new Intent();
        ComponentName cn = new ComponentName("org.witness.ssc.video", "org.witness.ssc.video.VideoEditor");
        intent.setComponent(cn);
        intent.setAction("android.intent.action.EDIT");
        intent.setType("video/*");

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="org.witness.sscphase1"
      android:versionCode="34"
      android:versionName="2.0-RC2b"
      android:installLocation="auto">

    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="18"/>

    <uses-permission android:name="android.permission.READ_MEDIA_STORAGE"/>

    <uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE"/>

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>

    <application android:label="@string/app_name" android:icon="@drawable/ic_launcher_ssc">
        <activity android:label="@string/app_name_label" android:name=".ObscuraApp"
              android:configChanges="orientation|keyboardHidden"
              android:theme="@android:style/Theme.Black.NoTitleBar"
              >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="org.witness.securesmartcam.ImageEditor" android:configChanges="orientation|keyboardHidden">
            <intent-filter>

                <action android:name="android.intent.action.EDIT" />
                 <action android:name="android.intent.action.SEND" />

                <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.ALTERNATIVE" /> 
                 <category android:name="android.intent.category.SELECTED_ALTERNATIVE" /> 

                 <data android:mimeType="image/*" />
             </intent-filter>        
        </activity>

        <activity android:name="org.witness.securesmartcam.ImagePreview" android:label="@string/image_preview" android:configChanges="orientation|keyboardHidden" />
        <activity android:name="org.witness.informa.InformaEditor" android:theme="@style/Theme.CustomDialog" />

        <activity android:name="org.witness.ssc.video.VideoEditor"  android:screenOrientation="landscape"  android:configChanges="orientation|keyboardHidden">
            <intent-filter>

                 <action android:name="android.intent.action.EDIT" />
                 <action android:name="android.intent.action.SEND" />

                <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.ALTERNATIVE" /> 
                 <category android:name="android.intent.category.SELECTED_ALTERNATIVE" /> 

                 <data android:mimeType="video/*" />
             </intent-filter>

        </activity>
       <activity android:name="org.witness.ssc.video.VideoPreferences" />

    </application>
</manifest> 

请帮忙。

0 个答案:

没有答案