Android Question Getting an unwanted icon on the notification Bar

MrKim

Well-Known Member
Licensed User
Longtime User
I am updating an old app (VERY old)
Manifest Was:
B4X:
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4"/>
New:
B4X:
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="28"/>

I have a service that starts when a call or a text occurs. This is now putting an icon on the taskbar which I don't want. When selected the icon opens my app.

I am putting my own icon up which runs a specific service when selected.

How do I prevent this icon from being created? (Or close it when it is.)

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
I solved my problem by adding CreateNotification to a Code Module per HERE.

Then adding:

B4X:
Sub Service_Create
    Dim Noti As Notification = NagMod.CreateNotification("Nag", "Stop Nagging!", "icon", StopNagging2, False, False)
    Service.AutomaticForegroundNotification = Noti

End Sub

To my service modules.

Thanks for the replies. I should have done a little more research before posting.
 
Upvote 0
Top