After a week of fiddling around trying to figure out why code that used to work no longer works I think maybe there is bug in Setinfo. I finally tried (Discovered) Setinfo2 it works fine. Setinfo does not call my activity but Setinfo2 does.
In order to test this I have created a stripped down test program. Which I have included. If I have simply missed something I would like to know.
Oh, one other thing, SetInfo works SOMETIMES! For example When I copied my program to create DoesntWork, stripped everything out and compiled it, it worked. The next day I compiled it in debug to see exactly what was happening compared to my full program and it no longer worked. Debug OR full compile. The reason I am using StopNagging2 is because when StopNagging stopped working in desperation I thought perhaps the file was corrupt. I created StopNagging2, copied in the code from StopNagging and it worked - for a while.
I am testing on a Samsung Note 2. Android Version 4.4.2.
Thanks in advance for any help.
Kim
In order to test this I have created a stripped down test program. Which I have included. If I have simply missed something I would like to know.
B4X:
Sub Process_Globals
Dim NTF As Notification
End Sub
Sub Service_Create
End Sub
Sub Service_Start (StartingIntent As Intent)
Try
NTF.Initialize
NTF.Cancel(1)
NTF.AutoCancel=True
NTF.Icon="nag36x36"
NTF.Vibrate= False
NTF.Sound = False
' NTF.SetInfo("Nag", "Stop Nagging!", StopNagging2) 'Doesn't Work
NTF.SetInfo2("Nag", "Stop Nagging!", "", StopNagging2) 'Works
NTF.Notify(1)
Catch
ToastMessageShow("SetNag Service_Start Error" & CRLF & LastException.Message,True)
End Try
End Sub
Oh, one other thing, SetInfo works SOMETIMES! For example When I copied my program to create DoesntWork, stripped everything out and compiled it, it worked. The next day I compiled it in debug to see exactly what was happening compared to my full program and it no longer worked. Debug OR full compile. The reason I am using StopNagging2 is because when StopNagging stopped working in desperation I thought perhaps the file was corrupt. I created StopNagging2, copied in the code from StopNagging and it worked - for a while.
I am testing on a Samsung Note 2. Android Version 4.4.2.
Thanks in advance for any help.
Kim
Attachments
Last edited: