Android app is creating duplicated shortcut in homescreen -
i run app on emulator (and on phones) , creating 2 shortcuts in homescreen. if delete app, removes both shortcuts.
my app have on splash screen
go main screen , i'm using android studio.
i believe related <intent-filter>
each time delete when run app appears again automatic on both <activity>
.
manifest file:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.epicbit.tecnoprolab" android:versioncode="1" android:versionname="1.0" > <uses-sdk android:minsdkversion="15" android:targetsdkversion="23" /> <receiver android:name="receiver.networkchangereceiver" > <intent-filter> <action android:name="android.net.conn.connectivity_change" /> </intent-filter> </receiver> <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-permission android:name="android.permission.change_network_state" /> <application android:allowbackup="true" android:hardwareaccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsrtl="true" android:theme="@style/apptheme" > <!-- splash screen --> <activity android:name="com.example.epicbit.tecnoprolab.splashscreen" android:label="@string/app_name" android:theme="@android:style/theme.black.notitlebar" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name="com.example.epicbit.tecnoprolab.mainactivity" android:label="@string/app_name" android:theme="@style/apptheme.noactionbar" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> </application>
edit: check video understand happen when follow sugestions:
remove code below mainactivity
<intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter>
your splashscreen root activity of app... so, parameters needed splashscreen.
final result
<!-- splash screen --> <activity android:name="com.example.epicbit.tecnoprolab.splashscreen" android:label="@string/app_name" android:theme="@android:style/theme.black.notitlebar" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name="com.example.epicbit.tecnoprolab.mainactivity" android:label="@string/app_name" android:theme="@style/apptheme.noactionbar" > </activity>
update
i checked picture.
i saw updating following file:
app/build/intermediates/manifests/full/debug/androidmanifest.xml
however, app/build file folder android studio put generated files...
try search manifest in source code folder.. like:
app/src/... (or other folder different build)
Comments
Post a Comment