notifications don't work with ics?

pjsmith

Member
Licensed User
Longtime User
Hi,

I have an app that worked fine on my htc desire, but after an upgrade to a htc one s, whilst notifications still vibrate or sound off and get reported in my app, they no longer appear in the notification bar at the top of the screen.

Does anything different need to be done for ics? Maybe it's a sense thing?

Thanks.
 

HotShoe

Well-Known Member
Licensed User
Longtime User
I only have a tablet that runs ICS, so it may be different. On mine, tapping on the time brings up notifications, but I know that HTC sense has a lot of different features.

--- Jem
 
Upvote 0

pjsmith

Member
Licensed User
Longtime User
Just revisiting this after a bit of a rest and the b4a upgrade!

Still cannot get this to work for some weird reason. I reduced the size of my notification icon to 24x24, but still it does not work.

My code is

' Show notification
Dim n As Notification
n.Initialize
n.icon = "androidicon"
n.AutoCancel=True
n.Insistent=False
n.Light=True
' set different behaviour for different priorities
If t.Priority = 0 Then n.Sound=False
If t.Priority > 0 Then n.Sound=True
If t.Priority = 2 Then n.Insistent=True
If t.Priority = -1 Then
n.Sound=False
n.Vibrate=False
End If
n.SetInfo("New alert", Data, Main)
' run the alert
n.Notify(alertId)

The vibrate, sounds etc work fine and if I drag down the notification bar the alert cancels, but I don't see the notification like I used to prior to changing my handset to the OneS. Anyone else had this with Sense ? (just wondering if it's an HTC thing, though it worked fine on my old desire)

Any suggestions?

Thanks.
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Notifications working fine so far on the wifes new Galaxy S III. Which is ICS. There seems to be a few niggles popping up regarding the HTC One series. Maybe they did too much tweaking. :(
 
Upvote 0

pjsmith

Member
Licensed User
Longtime User
OK. Following Erels advice, if anyone could test/review this very, very simple project for me and let me know if it works on their device, I'd be grateful. On the OneS, no notifications appear, though the vibrate etc does happen. I tried installing in an emulated device as I don;t have other hardware to test. It didn't work there either. This was a 4.03 virtual device.



Version=2.00
IconFile=
FullScreen=False
IncludeTitle=True
NumberOfModules=0
Package=uk.co.pjsmith.notifytest
Label=notifytest
VersionCode=1
VersionString=
Orientation=unspecified
CanInstallToExternalStorage=False
DoNotOverwriteManifest=False
ManifestCode=
NumberOfFiles=0
NumberOfLibraries=1
Library1=core
@EndOfDesignText@
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.

End Sub

Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.

End Sub

Sub Activity_Create(FirstTime As Boolean)
Dim n As Notification
n.Initialize
n.Insistent=False
n.Light=True
' set different behaviour for different priorities
n.OnGoingEvent=True ' also tried without this
n.SetInfo("New alert", "test", "") 'Change Main to "" if this code is in the main module.
' run the alert
n.Notify(0)
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub
 
Last edited:
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Try setting the notify id to 1 instead of 0.

Sent from my HTC Desire Z
 
Upvote 0
Top