I'm converting my project to B4A 8 and I have this issue:
I'm running a service, other than Starter, that gets started from the Main activity upon user action.
In the start sub, I set an icon and put it in foreground
Manifest file:
Using this configuration, the notification icon is correctly displayed
While transitioning to the new features, I updated the manifest with the theme macro as follows:
With this config, the notification icon is displayed as a mask: transparent pixels are transparent, while non-transparent pixels are all gray.
I'm running a service, other than Starter, that gets started from the Main activity upon user action.
In the start sub, I set an icon and put it in foreground
B4X:
Sub Service_Start (StartingIntent As Intent)
'more code
Dim n As Notification
n.Initialize
n.Icon = "icon"
n.Sound = False
n.Vibrate = False
n.Light = False
n.OnGoingEvent = True
n.SetInfo("Title","Body", Main)
Service.StartForeground(1, n)
'more code
End Sub
Manifest file:
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
'more code
SetApplicationAttribute(android:theme, "@android:style/Theme.Material.Light.DarkActionBar")
'more code
Using this configuration, the notification icon is correctly displayed
While transitioning to the new features, I updated the manifest with the theme macro as follows:
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="24"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
'more code
CreateResourceFromFile(Macro, Themes.LightTheme)
'more code
With this config, the notification icon is displayed as a mask: transparent pixels are transparent, while non-transparent pixels are all gray.