Thursday, June 6, 2024
 Popular · Latest · Hot · Upcoming
100
rated 0 times [  107] [ 7]  / answers: 1 / hits: 18625  / 5 Years ago, wed, april 17, 2019, 12:00:00

I want to display the Android Version in my app (like 8.0, 9.0...). For now I am using: Platform.Version But this returns the API version (24, 25...).



I would like an option that's more elegant than just creating a mapping, and that does not require republishing every time there is a new android release.
Is there a way to do that without an external library?


More From » reactjs

 Answers
3

you can :


import { Platform } from 'react-native';

const OsVer = Platform.constants['Release'];

[#52229] Thursday, April 11, 2019, 5 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sageallenv

Total Points: 458
Total Questions: 102
Total Answers: 104

Location: Venezuela
Member since Thu, Jul 15, 2021
3 Years ago
sageallenv questions
Wed, Jun 16, 21, 00:00, 3 Years ago
Fri, Apr 10, 20, 00:00, 4 Years ago
Sun, Feb 2, 20, 00:00, 4 Years ago
;