Prevent activity from opening inside another app - android

I am developing an app which receives share intents from other apps.
I specified android:launchMode="singleTask" in the AndroidManifest.xml which works fine when it receives share intents from most apps.
However, "Microsoft 365" (previously known as "Microsoft Lens") opens the app inside its app. So the user sees 2 same apps but one app is actually inside another app.
How can I prevent this?
https://github.com/localsend/localsend/issues/176
Current XML:
<application
android:label="LocalSend"
android:name="${applicationName}"
android:usesCleartextTraffic="true"
android:banner="#drawable/banner"
android:icon="#mipmap/ic_launcher"
android:requestLegacyExternalStorage="true"> <!-- localsend: image_gallery_saver requires requestLegacyExternalStorage -->
<!-- localsend: prevent multiple instances by android:launchMode="singleTask" -->
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTask"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="#style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<!-- enable Android TV -->
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
</intent-filter>
<!-- localsend: Receive share intent (share_handler) -->
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>

Related

Flutter App Starts from splash screen, even when started from the background

`When the user navigates to another app via our flutter app, and then comes back to the flutter app the flutter app gets started from the splash screen. Instead of the app to resume from where the user left of it starts from the splash screen. This happens only in some of the devices (low-end devices) and works perfectly fine for the high-end device. For example if the user wants to make a purchase (using razor pay) and selects the option to pay via google pay, the user will be directed to the google pay app, upon successful payment in google pay the user will be navigated back to the app but the app will again start from the splash screen instead of listening to the payment event
The user initiates a buy
Razor pay pop up opens up, the user chooses to pay via google pay
The user is navigated to the google pay app, and makes the purchase.
The user comes back to the flutter app, but instead of resuming where the user left of the app starts from the beginning that is the splash screen.
The AndroidManifest.xml is as follows
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.bynge.story">
<queries>
<provider android:authorities="com.facebook.katana.provider.PlatformProvider" />
<!-- allows app to access Facebook app features -->
</queries>
<application android:label="Notion Press" android:icon="#mipmap/ic_launcher" android:usesCleartextTraffic="true" android:name="com.clevertap.android.sdk.Application">
<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="bynge_local_notification" />
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="#mipmap/ic_launcher" />
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="#color/colorAccent" />
<activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="#style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize" android:exported="true">
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="#style/NormalTheme" />
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="#drawable/launch_background" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<!-- Deep Links -->
<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="bynge" android:host="app" />
</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="bynge" android:host="series" android:pathPrefix="/seriesid/episodeid" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="bynge.in" android:pathPrefix="/wa" />
</intent-filter>
</activity>
<meta-data android:name="flutterEmbedding" android:value="2" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="#string/facebook_client_token"/>
<activity android:name="com.facebook.FacebookActivity" android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:label="#string/app_name" android:exported="true"/>
<activity android:name="com.facebook.CustomTabActivity" android:exported="true">
<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="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity android:name="com.yalantis.ucrop.UCropActivity" android:screenOrientation="portrait" android:theme="#style/Theme.AppCompat.Light.NoActionBar" android:exported="true"/>
<meta-data android:name="CLEVERTAP_BACKGROUND_SYNC" android:value="1"/>
<meta-data android:name="CLEVERTAP_NOTIFICATION_ICON" android:value="ic_launcher"/>
<meta-data android:name="flutterEmbedding" android:value="2" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="com.android.vending.BILLING" />

Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without android exported

Issue:
You uploaded an APK or Android App Bundle which has an activity, activity alias, service, or broadcast receiver with intent filter, but without the 'android: exported' property set. This file can't be installed on Android 12 or higher.
My AndroidManifest.xml file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" package="com.example.MedNotes">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"/>
<!-- <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" /> -->
<queries>
<!-- If your app opens https URLs -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
<!-- If your app makes calls -->
<intent>
<action android:name="android.intent.action.DIAL" />
<data android:scheme="tel" />
</intent>
<!-- If your sends SMS messages -->
<intent>
<action android:name="android.intent.action.SENDTO" />
<data android:scheme="smsto" />
</intent>
<!-- If your app sends emails -->
<intent>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="*/*" />
</intent>
</queries>
<application android:name="io.flutter.app.FlutterApplication" android:label="MedNotes" android:icon="#mipmap/ic_launcher" android:exported="false">
<provider android:name="vn.hunghd.flutterdownloader.DownloadedFileProvider" android:authorities="${applicationId}.flutter_downloader.provider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="#xml/provider_paths"/>
</provider>
<provider android:name="androidx.work.impl.WorkManagerInitializer" android:authorities="${applicationId}.workmanager-init" tools:node="remove" android:exported="false" />
<provider android:name="vn.hunghd.flutterdownloader.FlutterDownloaderInitializer" android:authorities="${applicationId}.flutter-downloader-init" android:exported="false">
<!-- changes this number to configure the maximum number of concurrent tasks -->
<meta-data android:name="vn.hunghd.flutterdownloader.MAX_CONCURRENT_TASKS" android:value="5" />
</provider>
<activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="#style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize" android:exported="true">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="#style/NormalTheme" />
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="#drawable/launch_background" android:exported="false" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data android:name="flutterEmbedding" android:value="2" android:exported="false" />
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-3712936133525213~7043660238" android:exported="false"/>
<activity android:name="io.flutter.plugins.urllauncher.WebViewActivity" android:theme="#android:style/Theme.NoTitleBar.Fullscreen" android:exported="false"/>
<service android:name="com.google.firebase.messaging.FirebaseMessagingService" android:directBootAware="true" android:exported="false">
<intent-filter android:priority="-500">
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
I tried adding android: exported everywhere possible but can't solve the issue.
I can't access Merged Manifest as it is not showing.

There was a problem while parsing the packageā€ on Android 12

While Installing on Android 12 I'm getting this error
adb: failed to install C:\Users\***\Desktop\***\build\app\outputs\flutter-apk\app.apk: Failure
[INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl159430148.tmp/base.apk (at
Binary XML file line #263): com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver: Targeting S+
(version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]
AndroidManifest file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ordeno">
<application
android:label="abcd"
android:name="${applicationName}"
android:icon="#mipmap/ic_launcher">
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id"/>
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id"/>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="**********" />
<activity android:name="com.facebook.FacebookActivity"
android:exported="true"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<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="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="#style/NormalTheme"
/> <!-- stripe flutter -->
<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="sdk"
android:host="3ds.sdk.io" />
</intent-filter>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="#drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<!-- Deep linking -->
<meta-data android:name="flutter_deeplinking_enabled" android:value="true" />
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="dummy.page" />
<data android:scheme="https" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="#drawable/notification_icon"
/>
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="#string/default_notification_channel_id"
/>
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="#color/default_color"
/>
</application>
</manifest>
I have added andriod:exported="true" to all the activity tag's, it still shows the same
Issue is because of flutter_local_notifications library.
Adding below lines inside <application></application> in AndroidManifest.xml will fix the problem.
<receiver android:name="com.dexterous.flutterlocalnotifications.ActionBroadcastReceiver" />
<receiver android:exported="true" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<receiver android:exported="true" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
</intent-filter>
</receiver>

Is it possible for one app to be listed multiple times as an Android share option (YouTube play & queue)

I am wondering if it's possible for my Android app to show 2 different 'share' options under YouTube's "share" (app picker) dialog?
My app is accepting an Android intent to get the shared URLs, but I would like to offer two share options within YouTube's app-picker dialog, one to directly play the URL and another to queue the URL (I don't want to display an additional dialog in my app).
Currently, in the app's manifest file, I specify :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxx.XX_Remote"
android:versionCode="202"
android:versionName="2.0.2"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:glEsVersion="0x00020000" android:required="True"/>
<application android:persistent="False"
android:restoreAnyVersion="False"
android:label="XX Remote"
android:debuggable="True"
android:largeHeap="False"
android:icon="#drawable/ic_launcher"
android:theme="#style/AppTheme"
android:hardwareAccelerated="true"
android:resizeableActivity="false">
<!-- Our activity is a subclass of the built-in NativeActivity framework class.
This will take care of integrating with our NDK code. -->
<activity android:name="com.embarcadero.firemonkey.FMXNativeActivity"
android:label="XX Remote"
android:configChanges="orientation|keyboard|keyboardHidden|screenSize"
android:launchMode="singleTask">
<!-- Tell NativeActivity the name of our .so -->
<meta-data android:name="android.app.lib_name"
android:value="XX_Remote" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="Play in XX">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter android:label="Queue in X">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<receiver android:name="com.embarcadero.rtl.notifications.NotificationAlarm" />
</application>
</manifest>
However, the second (queue) intent doesn't show up at all.
And if it did show up, I'm not sure how to read the intent's label by code so I can distinguish between the two intents.
One <activity> tag cannot match multiple intent filters simultaneously.
For that purpose you can use <activity-alias> in your manifest which presents same activity as a separate entity:
<activity android:name="com.embarcadero.firemonkey.FMXNativeActivity"
android:label="XX Remote"
android:configChanges="orientation|keyboard|keyboardHidden|screenSize"
android:launchMode="singleTask">
<!-- Tell NativeActivity the name of our .so -->
<meta-data android:name="android.app.lib_name"
android:value="XX_Remote" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- use only one intent filter for SEND action in activity tag-->
<intent-filter android:label="Play in XX">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<!-- note that we will use android:name for resolving if this alias was used to start activity -->
<activity-alias
android:targetActivity=".com.embarcadero.firemonkey.FMXNativeActivity"
android:name=".com.embarcadero.firemonkey.FMXNativeActivity.Queue">
<!-- Put second SEND action inside activity-alias tag -->
<intent-filter android:label="Queue in X">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity-alias>
Then inside your activity you can resolve if it was started through alias by checking intents component:
// inside onCreate and/or onNewIntent (after resolving that intent action is SEND):
if (intent.component.className.endsWith(".Queue"){
// putting data in the queue...
} else {
// playing requested data...
}

When I open my app from a play store link it doesn't load any activity and goes white screen

I have an application published in the play store. When I share the link on facebook or on other social and then I click on it from mobile, if the device has already the app instead of opening the play store it loads directly my application. The problem is that when it happens the app doesn't load any activity and got stuck on white screen. I think that this is probably related to the Application class but I don't know how to solve this.
public class AppGlobal extends Application {
#Override
public void onCreate() {
super.onCreate();
// things that I must do by extending application
if(DEBUG)
Log.e("AppGlobal","Started");
}
}
Update: This is the link that users click on the facebook posts. Please note that the behaviour I described occurs only when the post has been clicked on facebook app and the user has already installed my application on the same device.
https://play.google.com/store/apps/details?id={package-name-of-app}
When I try to clink the play store link this is the debug logging.
04-10 12:32:47.955 11111-11111/? E/Zygote: v2
04-10 12:32:47.956 11111-11111/? E/Zygote: accessInfo : 0
04-10 12:32:49.056 11111-11111/it.mybeautifullApp E/AppGlobal: Started
I've also read online that this could be related to the lack of intent filters in the manifest, but I think that I've set them correctly:
Update 2: posted the whole manifest (updated with new deep linking attempts)
<application
android:name=".AppGlobal"
android:allowBackup="false"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:replace="android:icon,android:allowBackup">
<activity
android:name=".SplashActivity"
android:theme="#style/NoActionBar">
<intent-filter android:label="from_play_store">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="play.google.com" />
</intent-filter>
<intent-filter android:label="from_play_store_market">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="market"
android:host="details?id=it.cineprime" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".LoginActivity"
android:theme="#style/NoActionBar" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<meta-data
android:name="preloaded_fonts"
android:resource="#array/preloaded_fonts" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<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="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity
android:name=".SignupActivity"
android:theme="#style/NoActionBar" />
<activity
android:name=".MainActivity.MainActivity"
android:screenOrientation="portrait" />
<activity android:name=".CheckoutActivity" />
<activity
android:name=".SurveyActivity"
android:theme="#style/NoActionBar" />
<activity android:name=".BarcodeActivity" />
<activity
android:name=".SettingsActivity"
android:label="#string/title_activity_settings"
android:parentActivityName=".MainActivity.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="it.cineprime.MainActivity.MainActivity" />
</activity>
<activity
android:name=".IntroActivity"
android:screenOrientation="portrait"
android:theme="#style/NoActionBar" />
<activity
android:name=".DetailActivity"
android:theme="#style/NoActionBarCollapsing" />
</application>
So the question is: How can I intercept when my application is called in the way described above or how can I at least avoid the white screen stuck?
make <item name="android:windowBackground">#null</item> in your theme for getting rid of white screen
You don't say what kind of URL you are using for linking to the app. Here is some documentation on recommended formats. Putting the URL you are sharing on social media in your question would help.
But you might want to read the documentation on linking to specific content in your app. I suspect you are using one of these links, but haven't set up the intent filter for it, as described here.
Specifically you will need:
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
to handle default views in the Intent. I suspect the <data> coming in is not #string/fb_login_protocol_scheme so there is no activity to handle it.

Categories

Resources