Fix missing detection for many Kindle Fire devices #540
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The previous regex to detect Kindle Fire devices is incomplete, so it can only detect Kindle Fire (1st Gen) and Kindle Fire HD 7 (2nd Gen). The reason why is that it uses a device specific identifier, which is referenced as Build Model in the document.
We can fix this problem by using the more generalized regex to detect many other Kindle Fire devices. The regex is from the official document, but with a little tweaking for simplification. The original regex is for not only detecting the devices but also extracting Build Models and version number of the browser, which we do not need to do them.
https://docs.aws.amazon.com/silk/latest/developerguide/detecting-silk-ua.html
Thank you for this great gem.
Best Regards.