On 99 % of devices app icon on header taskbar is showing without problem: image
but on Sony Xperia Z3, Lollipop, it appears as white square: image
heres application section from my manifest doc:
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="intent.to.front" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="hidden" />
<activity
android:name=".FromActivity"
android:label="@string/title_activity_from" />
<activity
android:name=".ToActivity"
android:label="@string/title_activity_to" />
<activity
android:name=".RateActivity"
android:label="@string/title_activity_rate" />
<activity
android:name=".VerificationActivity"
android:label="@string/title_activity_verification" />
<activity
android:name=".CrashActivity"
android:label="@string/title_activity_crash" />
<activity
android:name=".OrderProgressActivity"
android:label="@string/title_activity_order_progress"
android:launchMode="singleTop">
<intent-filter>
<action android:name="intent.to.front" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
So if you know answer, please help and why is it only happening to xperia device?
Lollipop devices add there own square to notification icons. You need to make sure that your image has an alpha background so when a color fill is applied to it, you can still see the image.
If you still want it to appear as it does on older devices you can do some checking code to see what version of Android they are running and supply a different icon.
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With