'Two app icons when i install my application from google play
installing my App on my physical device using the .apk or even by debugging through USB works fine and only makes one launcher icon ,but when i install the same app from google play it makes two launcher icons one with the application name and the other one is called "Pending" and has the same application icon any idea what am i doing worng? , thx in advance
here is my manifest
AndroidManifest.xaml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="36" android:versionName="1.0.36" package="com.mypackage.dotforms35" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application android:largeHeap="true" android:label="myapplicationame" android:icon="@mipmap/myicon">
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" android:exported="false" />
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
and here is my main activity
MainActivity.cs
[Activity(Label = "myapplicationaname", Icon = "@mipmap/myapplicationicon", Theme = "@style/MainTheme", MainLauncher = false, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
Rg.Plugins.Popup.Popup.Init(this);
UserDialogs.Init(this);
IsPlayServicesAvailable();
CreateNotificationChannel();
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
CachedImageRenderer.Init(true);
Stormlion.PhotoBrowser.Droid.Platform.Init(this);
}
and here is my SplashActivity.cs
[Activity(Label = "myapplicationname", Icon = "@mipmap/myapplicationicon", Theme = "@style/MyTheme.Splash",LaunchMode =LaunchMode.SingleTop, MainLauncher = true, NoHistory = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]public class splashactivity : FormsAppCompatActivity
{ public override void OnCreate(Bundle savedInstanceState, PersistableBundle persistentState)
{
base.OnCreate(savedInstanceState, persistentState);}
protected override void OnResume()
{
base.OnResume();
Task startupWork = new Task(() => { SimulateStartup(); });
startupWork.Start();
}
async void SimulateStartup()
{
StartActivity(new Intent(Application.Context, typeof(MainActivity)));
}
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|