Issue
Please I have an android app with more than 3 android activity, everything is working fine till I added on splashScreen activity that will only show once per app installed or data cleared. Now the problem is when I install app I will see two lunch icon on the screen which is not normal. Please can anyone assist me below are my activity and the use of it.
SplashScreen: Once app is installed, it contain webview inside.
SplashScreenOnload: every time app is lunched, it will show for 500 milliseconds and redirect to ApplicationMainActivity, no webview inside.
ApplicationMainActivity: this is main app activity, it contain webview.
UriSchemActivity: this is for url scheme extraction, no webview.
PopLoginActivity: this is for url popup, any external url clicked in ApplicationMainActivity will open here, it contain webview
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.shop"
android:installLocation="auto">
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<application
android:hardwareAccelerated="true"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".SplashScreen"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="sensorPortrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SplashScreenOnload"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="sensorPortrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ApplicationMainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:screenOrientation="sensorPortrait">
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
<activity android:name=".UriSchemActivity"
android:screenOrientation="sensorPortrait">
<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="http" />
<data android:scheme="https" />
<data android:scheme="example" />
<data android:scheme="fs" />
<data android:host="www. example.com" />
<data android:host="example.com" />
<data android:pathPrefix="/app/www/" />
<data android:pathPrefix="/app/" />
<data android:pathPattern=".*" />
</intent-filter>
</activity>
<activity
android:name=".PopLoginActivity"
android:screenOrientation="sensorPortrait"
android:theme="@style/Theme.Transparent" />
<service android:name=".FcmMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />
</application>
</manifest>
Solution
Putting
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
at many places cause your problem!
You need decide one launcher Activity
Answered By - Liar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.