I have an app that integrates both Facebook and LinkdedIn networks. According to the instructions, in order to integrate LinkedIn, I need to add the following code in my manifest, within my activity:
<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="x-oauthflow-linkedin" android:host="callback" />
</intent-filter>
An example can also be found here. As you can see in the link, we need to add also the " android:launchMode="singleInstance" " line, otherwise after logging in with LinkedIn a new instance of the activity will be started.
However, when trying to log in to Facebook from the same activity, this actual line results to the following error from the Facebook Login activity (!):
E/AndroidRuntime(7100): Caused by: com.facebook.FacebookException: Cannot call LoginActivity with a null calling package. This can occur if the launchMode of the caller is singleInstance.
So now, I'm somehow stuck, because removing android:launchMode="singleInstance" will make Facebook login working, but will cause the LinkedIn login to start another instance of my activity, but if I add it, then Facebook login is not working!
Does anyone have any idea how to address this issue?
Thank you,
Dimitris