Greetings,
My customers are noticing a notification being displayed in the notification area of their screens as soon as they place my app's widget on their home screens. The app does not have any notifications defined nor are they used in any of my coding. This seems to be tied into the widget which also does not have anything like that in use.
The notification seems persistent. They can't use "Clear" to clear out the notification.
I would assumed there was a parameter to set in ConfigureHomeWidget that controlled the notification but didn't find anything in there based on the parameter names. I also checked if there was a property I could set in RemoteView but couldn't find any.
I don't mind the notification but it's my customers who don't want to see it.
All help will be appreciated.
Thanks.
My customers are noticing a notification being displayed in the notification area of their screens as soon as they place my app's widget on their home screens. The app does not have any notifications defined nor are they used in any of my coding. This seems to be tied into the widget which also does not have anything like that in use.
The notification seems persistent. They can't use "Clear" to clear out the notification.
I would assumed there was a parameter to set in ConfigureHomeWidget that controlled the notification but didn't find anything in there based on the parameter names. I also checked if there was a property I could set in RemoteView but couldn't find any.
I don't mind the notification but it's my customers who don't want to see it.
All help will be appreciated.
Thanks.
Coding from the widget:
#Region Service Attributes
#StartAtBoot: True
#End Region
Sub Process_Globals
Private strShared As String
Dim rv As RemoteViews
Private kvs As KeyValueStore
End Sub
Sub Service_Create
InitializeObjects
rv = ConfigureHomeWidget("WidgetLayout", "rv", 1, "The Prayer Times")
End Sub
Sub Service_Start (StartingIntent As Intent)
UpdateWidgetPrayerTimes
If rv.HandleWidgetEvents(StartingIntent) Then
Return
End If
End Sub
Sub rv_RequestUpdate
rv.UpdateWidget
End Sub
Sub rv_Disabled
StopService("")
End Sub
Sub Service_Destroy
End Sub
' Misc. sub routines
'-------------------
Sub InitializeObjects
strShared = Starter.rp.GetSafeDirDefaultExternal("Settings")
kvs.Initialize(strShared, "Settings")
End Sub
Sub UpdateWidgetPrayerTimes
' Display the prayer times from the database.
'--------------------------------------------
rv.SetText("LabelFajr", "Fajr: " & kvs.Get("FajrSalatTime"))
rv.SetText("LabelSunrise", "Sunrise: " & kvs.Get("SunriseTime"))
rv.SetText("LabelDhuhr", "Dhuhr: " & kvs.Get("DhuhrSalatTime"))
rv.SetText("LabelAsr", "Asr: " & kvs.Get("AsrSalatTime"))
rv.SetText("LabelMagrib", "Magrib: " & kvs.Get("MagribSalatTime"))
rv.SetText("LabelIsha", "Isha: " & kvs.Get("IshaSalatTime"))
' Blue indicates it's time for wudu. Green indicates salat came in.
' Black is the default colour.
'------------------------------------------------------------------
Select kvs.Get("FajrTextColour")
Case "Blue"
rv.SetTextColor("LabelFajr", Colors.Blue)
Case "Green"
rv.SetTextColor("LabelFajr", Colors.RGB(49,152,16))
Case "Black"
rv.SetTextColor("LabelFajr", Colors.Black)
End Select
Select kvs.Get("SunriseTextColour")
Case "Green"
rv.SetTextColor("LabelSunrise", Colors.RGB(49,152,16))
Case "Black"
rv.SetTextColor("LabelSunrise", Colors.Black)
End Select
Select kvs.Get("DhuhrTextColour")
Case "Blue"
rv.SetTextColor("LabelDhuhr", Colors.Blue)
Case "Green"
rv.SetTextColor("LabelDhuhr", Colors.RGB(49,152,16))
Case "Black"
rv.SetTextColor("LabelDhuhr", Colors.Black)
End Select
Select kvs.Get("AsrTextColour")
Case "Blue"
rv.SetTextColor("LabelAsr", Colors.Blue)
Case "Green"
rv.SetTextColor("LabelAsr", Colors.RGB(49,152,16))
Case "Black"
rv.SetTextColor("LabelAsr", Colors.Black)
End Select
Select kvs.Get("MagribTextColour")
Case "Blue"
rv.SetTextColor("LabelMagrib", Colors.Blue)
Case "Green"
rv.SetTextColor("LabelMagrib", Colors.RGB(49,152,16))
Case "Black"
rv.SetTextColor("LabelMagrib", Colors.Black)
End Select
Select kvs.Get("IshaTextColour")
Case "Blue"
rv.SetTextColor("LabelIsha", Colors.Blue)
Case "Green"
rv.SetTextColor("LabelIsha", Colors.RGB(49,152,16))
Case "Black"
rv.SetTextColor("LabelIsha", Colors.Black)
End Select
rv.UpdateWidget
End Sub
Sub DisplaySalatCountdown (strTimeBeforeSalat As String, strFlashMode As String)
rv.SetText("LabelSalatCountdown", strTimeBeforeSalat)
Select strFlashMode
Case "Flash Countdown Invisible"
rv.SetVisible("LabelSalatCountdown", False)
Case "Flash Countdown Visible"
rv.SetVisible("LabelSalatCountdown", True)
rv.SetTextColor("LabelSalatCountdown", Colors.RGB(206, 23, 23))
Case "Normal Countdown"
rv.SetVisible("LabelSalatCountdown", True)
rv.SetTextColor("LabelSalatCountdown", Colors.Black)
End Select
rv.UpdateWidget
End Sub
' Event handlers.
'----------------
Sub PanelPrayerTimes_Click
StartActivity(Main)
End Sub