Open euantorano opened 2 years ago
I found a few problems with this issue:
Hi @euantorano thank you for reporting this issue. You are right, it appears that the SDK is mapping the millisecond durations to seconds strings correctly. Are you by any chance able to test on a different device?
Also, (a speculation from my side), sometimes if DefaultSound
is set to true
and if the device is on vibrate it vibrates instead of playing a sound in addition to vibrating based on the VibrateTimingsMillis
config you set (I highly doubt this is the case though).
@chong-shao Do you know if we have resources to test the BE API on this?
@euantorano : regarding the optimisations, this feature is also a community contribution #203 so please feel free suggest any changes by opening PRs. :) We appreciate it!
I’ve got a couple of devices to test with on varying API levels, I’ll give them a go tomorrow morning or early next week.
We have DefaultSound disabled by the way, as we don’t want any sound with the notification (we only want it to vibrate).
On 30 Mar 2022, at 20:24, Lahiru Maramba @.***> wrote:
Hi @euantorano thank you for reporting this issue. You are right, it appears that the SDK is mapping the millisecond durations to seconds strings correctly. Are you by any chance able to test on a different device? Also, (a speculation from my side), sometimes if DefaultSound is set to true and if the device is on vibrate it vibrates instead of playing a sound in addition to vibrating based on the VibrateTimingsMillis config you set (I highly doubt this is the case though).
@chong-shao Do you know if we have resources to test the BE API on this?
@euantorano : regarding the optimisations, this feature is also a community contribution #203 so please feel free suggest any changes by opening PRs. :) We appreciate it!
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
The
AndroidNotification::VibrateTimingMillis
property is documented as follows:Today I wanted to send a notification that would vibrate for 500 milliseconds, so I set this property as follows:
On the device though, this resulted in a very long vibration, that lasted for several seconds.
After experimenting, sending a value of
{ 0, 1 }
results in a vibration lasting 1 second - I've reviewed the relevant code for this (inVibrateTimingsString
) and tested it on its own, and the above code results in the value0s, 0.500000000s
being sent to the API, which appears correct.I'm not sure if this is a fault on the device I was testing against as it is running a very dated version of Android unfortunately (we're stuck with it due to customer requirements and it's stuck on Android 7.1.1).
PS: I also noticed a few possible micro-optimisations that could be made to some of this new code, such as pre-sizing the list for the
timingsStringList
, I'm not sure if it's worth opening a PR for these changes.