Android 我的Manifest.xml(INTENT)有问题吗?

Android 我的Manifest.xml(INTENT)有问题吗?,android,android-intent,Android,Android Intent,SplashScreen是我的加载屏幕,当加载完成时,我创建一个调用MainActivity的意图。 为了验证它,我为Twitter登录创建了一个意图(浏览器),该登录可以正常工作,但当意图自动关闭时,我不会重定向到我的MainActivity。产生另一个活动,为什么?我认为我的舱单有问题: <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:lab

SplashScreen是我的加载屏幕,当加载完成时,我创建一个调用MainActivity的意图。 为了验证它,我为Twitter登录创建了一个意图(浏览器),该登录可以正常工作,但当意图自动关闭时,我不会重定向到我的MainActivity。产生另一个活动,为什么?我认为我的舱单有问题:

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.android.ikgflipper.SplashScreen"
        android:label="@string/app_name" 
        android:screenOrientation="portrait"
        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>
    </activity>
    <activity
        android:name="com.android.ikgflipper.MainActivity"
        android:label="@string/app_name" 
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
        android:launchMode="singleTask">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="oauth" android:host="MainActivity"/>
        </intent-filter>
    </activity>
</application>

我的意向声明:

public class loginTwitter extends AsyncTask<Void, Void, String> {

    @Override
    protected String doInBackground(Void... params) {
        twitter = new TwitterFactory().getInstance();
        try {
            twitter.setOAuthConsumer(TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET);
            requestToken = twitter.getOAuthRequestToken(TWITTER_CALLBACK_URL);
        } catch(Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    protected void onPostExecute(String s) {
        startActivity(new Intent(Intent.ACTION_VIEW,
                    Uri.parse(requestToken.getAuthenticationURL())));
    }
}
公共类loginTwitter扩展异步任务{
@凌驾
受保护字符串doInBackground(无效…参数){
twitter=new TwitterFactory().getInstance();
试一试{
setOAuthConsumer(twitter\u CONSUMER\u KEY,twitter\u CONSUMER\u SECRET);
requestToken=twitter.getOAuthRequestToken(twitter\u回调\u URL);
}捕获(例外e){
e、 printStackTrace();
}
返回null;
}
@凌驾
受保护的void onPostExecute(字符串s){
startActivity(新意图(意图、行动和视图),
parse(requestToken.getAuthenticationURL());
}
}

提前谢谢。

您在项目中使用了多少个类?除了维护活动,我更新我的帖子。除MainActivity外,共有五个类。你所说的“生成了另一个活动”是什么意思?什么类型的活动?像我的MainActivity一样,有一个新的意图,但它是空的。当我按下后退按钮时,我找到了正确的活动。我有两个活动,我的启动屏幕和我的主要活动!我从我的主要活动启动我的意向Twitter登录。我的声明可能有问题吗?