[英]Can't launch app with ParseLoginActivity
This is from my AndroidManifest.xml 这是从我的AndroidManifest.xml
<activity
android:name="com.parse.ui.ParseLoginActivity"
android:label="@string/app_name"
android:launchMode="singleTop" >
<meta-data
android:name="com.parse.ui.ParseLoginActivity.PARSE_LOGIN_ENABLED"
android:value="true" />
<meta-data
android:name="com.parse.ui.ParseLoginActivity.FACEBOOK_LOGIN_ENABLED"
android:value="true" />
<meta-data
android:name="com.parse.ui.ParseLoginActivity.TWITTER_LOGIN_ENABLED"
android:value="true" />
</activity>
This is the main activity that the app launches into: 这是应用程序启动到的主要活动:
<activity
android:name="com.elgami.feed.FeedActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
The problem I'm having is that when a fresh user downloads the app they are launched directly into the FeedActivity but they aren't a user and everything is bugged out. 我遇到的问题是,当新用户下载该应用程序时,它们将直接启动到FeedActivity中,但他们不是用户,并且一切都被窃听了。 They shouldn't be at the FeedActivity until after they've logged in or registered.
在登录或注册后,他们才应该进入FeedActivity。
It also says "Element intent-filter is not allowed here" when I try to place this into the GlobalApplication. 当我尝试将其放入GlobalApplication时,它还会显示“此处不允许元素意图过滤器”。 When I try to put it exclusively in the ParseLoginActivity it opens correctly to ParseLoginActivity but now it won't launch into FeedActivity, the screen minimizes and I get this:
当我尝试将其专门放置在ParseLoginActivity中时,它可以正确打开到ParseLoginActivity,但是现在它不会启动到FeedActivity中,屏幕最小化,我得到以下信息:
11-25 14:20:14.677 1098-1144/com.test.app E/Surface﹕ getSlotFromBufferLocked: unknown buffer: 0x9de46060
This is my DispatchActivity: 这是我的DispatchActivity:
public class DispatchActivity extends ParseLoginDispatchActivity {
@Override
protected Class<?> getTargetClass() {
return FeedActivity.class;
}
}
Okay this was dumb of me. 好吧,这对我来说是愚蠢的。 I needed to make sure that the app launched to DispatchActivity only and nowhere else:
我需要确保该应用仅在DispatchActivity上启动,而在其他任何地方都没有启动:
<activity
android:name=".DispatchActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
My DispatchActivity must launch to the Activity I want the user to see once login/registration is complete: 登录/注册完成后,我的DispatchActivity必须启动至我希望用户看到的活动:
public class DispatchActivity extends ParseLoginDispatchActivity {
@Override
protected Class<?> getTargetClass() {
return FeedActivity.class;
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.