Customer's phone vibrates for no reason?

Kevin

Well-Known Member
Licensed User
Longtime User
I had a customer email me last night to complain about turning off the "annoying vibrations" in my app. After getting some more information, I am stumped.

My app does have haptic feedback on button presses but can be turned off (and the customer said he did). He said it no longer vibrates when he presses keys in my app, but that is not his complaint....

He says that when he starts my app (or goes to another activity in my app then returns to the main activity) his phone vibrates 6 times (long, short, short, long, short, short).

My app does show a notification icon in ongoing notifications when on the main activity but it is configured (through code of course) to be completely silent: No vibrations, no sounds, just a notification icon and text.

I have never had anyone else complain about this and I asked him to disable the notification and get back to me with results but he hasn't.

My thought is it is a function of this phone, and possibly his phone is on silent or something?

It is a Samsung Droid Charge.

Any thoughts???
 

JonPM

Well-Known Member
Licensed User
Longtime User
Can you post apk or store link? Then we can try to reproduce the events.

Sent from my DROIDX using Tapatalk 2
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
Unfortunately the notifications only work in the paid version.

It's really strange, because there is no reason for it to vibrate like that. I double-checked my code and other than key presses, there are no vibration statements.

I'm kind of hoping someone has seen something like this before.
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
I assume it isn't force closing, only because the customer would likely have mentioned that.
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
I had another customer with the same phone (Droid Charge) complain about this now too.

I asked him to disable the notification icon in my app and he said the vibrations went away.

Maybe I am doing something fundamentally wrong with them, but one thing I don't understand is that I am explicitly setting vibration to off (at least I think I am) in the notification statement. In fact, this does not vibrate on my EVO, and I am inclined to think this is an issue with the Droid Charge, at least the only two complaints I have gotten were with that phone.

Below is the sub I use to toggle the notification icon. Here is what I am doing:

1) If the app is the free version (DemoVersion = True) then I always try to remove the notification because it is a pro-only feature. This is done with a Try/Catch just in case there is not a notification present.

2) If the app is the pro (paid) version and I want to show or update the notification, I check to see if STBName has a value and if so, it is mentioned in the notification. Otherwise I use a generic notification.

3) Even in the pro version, I only allow the notification icon to appear if the user is on the main activity. So if they start another activity in my app, I hide the notification if it is present then re-show it when they return to the main activity.
B4X:
Sub ToggleNotificationIcon (OnOff As Boolean)
  If OnOff = True Then
    If Common.DemoVersion = False Then
      Dim n As Notification
      n.Initialize
      n.Icon = "icon":n.AutoCancel = False:n.Light = False:n.Sound = False:n.Vibrate = False
      n.OnGoingEvent = True
      If Common.STBName <> "" Then
        n.SetInfo("DirecTV Remote", Common.STBName, "") 
          Else
            n.SetInfo("DirecTV Remote", "Press here to use the remote", "")
      End If
      n.Notify(1)
          Else
            Try
              Dim n As Notification
              n.Cancel(1)
              Catch
            End Try
    End If
      Else
        Try
          Dim n As Notification
          n.Cancel(1)
          Catch
        End Try
  End If
End Sub


On that strange vibration pattern, I can only guess that maybe it is from my code hiding and showing (or "reshowing") it multiple times. I think I have it set to show (reduntantly) in several places in the code. I didn't think this would ever be an issue but obviously it is if it is vibrating! But it shouldn't be! :confused:

Another thought: Should I maybe be declaring "Dim n As Notification" in globals rather than redeclare it everytime I want to hide or show it?

I don't know why this is happening on the Droid Charge and I certainly hope it isn't happening on too many other devices because it would definitely annoy people enough to uninstall / refund the paid app.

:sign0085:
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
In an interesting twist, the customer found a work around by changing a setting on his phone (vibration intensity and then turning haptic feedback off).

But even more puzzling.... I had him try a competing app that also shows notifications and he said that the other app does not cause his phone to vibrate, even without the work-around in place. So something seems to be wrong but I don't know what. :confused:
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Just out of curiosity try testing without setting the notification as an ongoing event...
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
The competing app is an ongoing event as well. Anything I try, I'd have to see if the customer is willing to try a test version because I can't reproduce the problem on my own phone.


I wonder if for some reason the notification object in B4A is doing something a bit differently or some kind of bug? I wish I could reproduce it... it's frustrating.
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
OK, this is going to be very hard to solve without a trial and error option, wonder if any forum goer has a Droid Charge to help setup a test bed. Is the competitors app definitely an on-going notification and not a 'no clear' notification?

Is it possible to see more of your code? i.e. what calls the posted sub? what other vibrate functionality does the app have. Is it possible it's NOT the notification that is causing issue. i.e. if app has haptic feedback and it's not quite setup right??
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
I'm pretty certain the other app's notification is "ongoing" only because it appears in the "Ongoing" section on my phone, the same spot as mine.

I don't have access to my code right now (I'm at work) but essentially it is something like this:

B4X:
If ShowNotificationIcon = True then ToggleNotificationIcon (True)

ShowNotificationIcon is a global variable that holds the user's option to show the notification or not.

The only vibration used in my app is for haptic feeback and that only occurs in Button_Click subs (and of course it first checks to see if that option is enabled).

I'm certain it isn't a problem with the haptic feedback functions because I use that option in my own app and I have never had the phone vibrate like that before. Besides, both customers said they turned that option off which stopped the button press feedback but NOT the notification vibrations.

In fact, I experimented last night by temporarily setting the n.Vibrate option to True and my app vibrated when the customer said his did. Only problem is I had to enable that option to get my phone to vibrate. Apparently the Droid Charge vibrates even with that option set to False.

Very puzzling. I'm inclined to think it is a function of the phone that overrides normal notification settings in apps but if that is the case, why doesn't the other app vibrate when his notifications appear?

I wonder if I can set vibration intensity in the notification. If so, perhaps I can set it to 0 and maybe trick those phones into thinking it is vibrating already? I'm just grasping at straws now.

:BangHead:
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
You can't set the intensity BUT with the Custom Notification Library you can set a custom vibration pattern.

You specify OFF, ON, OFF, ON, OFF, ON,......... in milliseconds.

Just as a thought (not tested this thought) you could set a custom vibration of say 1 second off then 1 millisecond on which MAY be too short to actually cause a vibration, You could also try just setting the first off period and not setting a on period.

I don't know how each of these will work out but it may be an option.

I don't know what your app is or why it shows a notification but using NoClear instead of OnGoing may also work out for you. Again this is available in the Custom Notification Library.
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
I can maybe try that custom library.

What exactly is NoClear? Is that when the person clicks on the notification it does not automatically disappear?

I kind of like having it in the Ongoing section. My app is a remote control app for a satellite receiver. The idea of the ongoing notification is that even after they have exited the app, they can quickly re-open it right from the notification tray. It also tells them at a glance which receiver is currently selected (for controlling).
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Yes, the notification does not clear when tapped. I can understand the reasoning behind you prefering ongoing.

no clear if very similar except it goes in the standard list as apposed to the on going list.

Hope you get it sorted anyway, these little device-specific bugs can be very annoying. Are your and your competitors app paid for or free?
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
I saw that your library requires a newer Android JAR file. Would that have any impact on how my app compiles, or cause it to be incompatible with Android 1.6 or newer as it is now?
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
I saw that your library requires a newer Android JAR file. Would that have any impact on how my app compiles, or cause it to be incompatible with Android 1.6 or newer as it is now?

No it doesn't, that would be the MinSDKVersion setting.
 
Upvote 0

lymey

Active Member
Licensed User
Longtime User
Vibration issues too

Hi,
I was wondering if you had any resolution?
I have a customer with a Samsung Galaxy S Blaze with 2.3.6, and the same thing happens.
In my app the notification changes depending on activity function. I very specifically set the notification to the following bit it vibrates anyway!:

B4X:
Mx.notification1.Initialize
     Mx.notification1.Icon = "notification_bw_x50"
     Mx.notification1.Vibrate = False
     Mx.notification1.Sound = False
     Mx.notification1.SetInfo("Logged In", "Waiting For Messages", "Activity_1")
     Mx.notification1.Notify(1)

It doesn't happen on a Samsung Galaxy Mini with 2.3.6 and nobody else has yet to report it as an issue.
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
I haven't heard anything directly from my app users (why don't they ever email with issues????) but judging from comments I occasionally see in the market, it is still happening. I also believe that, at least on some phones, it may play a sound as well when the notification appears.

Barx was kind enough to make a custom version of his other custom library that gives us much more control over notification options but unfortunately I don't think it fixed the problem.

Personally I feel that this may either be an issue of creating apps with B4A or possibly some kind of bug in how B4A does notifications but as best I could tell, the custom notification linked above does it more directly.

One thing that leads me to believe the above is this post. I haven't had a chance to play with it yet but I don't know if it will help or not.
 
Upvote 0
Top