Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
react-native-device-info
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
放牛的园子
react-native-device-info
Commits
71796205
Commit
71796205
authored
Sep 26, 2017
by
Gant Laborde
Committed by
GitHub
Sep 26, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #232 from firefueled/get-android-api-level
Add android-only getAPILevel method
parents
50357ab7
f7226362
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
0 deletions
+6
-0
README.md
README.md
+0
-0
RNDeviceInfo.m
RNDeviceInfo/RNDeviceInfo.m
+1
-0
RNDeviceModule.java
...c/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
+1
-0
deviceinfo.js
deviceinfo.js
+3
-0
RNDeviceInfoModule.cs
windows/RNDeviceInfo/RNDeviceInfoModule.cs
+1
-0
No files found.
README.md
View file @
71796205
This diff is collapsed.
Click to expand it.
RNDeviceInfo/RNDeviceInfo.m
View file @
71796205
...
...
@@ -187,6 +187,7 @@ RCT_EXPORT_MODULE()
return
@{
@"systemName"
:
currentDevice
.
systemName
,
@"systemVersion"
:
currentDevice
.
systemVersion
,
@"apiLevel"
:
@"not available"
,
@"model"
:
self
.
deviceName
,
@"brand"
:
@"Apple"
,
@"deviceId"
:
self
.
deviceId
,
...
...
android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
View file @
71796205
...
...
@@ -121,6 +121,7 @@ public class RNDeviceModule extends ReactContextBaseJavaModule {
constants
.
put
(
"model"
,
Build
.
MODEL
);
constants
.
put
(
"brand"
,
Build
.
BRAND
);
constants
.
put
(
"deviceId"
,
Build
.
BOARD
);
constants
.
put
(
"apiLevel"
,
Build
.
VERSION
.
SDK_INT
);
constants
.
put
(
"deviceLocale"
,
this
.
getCurrentLanguage
());
constants
.
put
(
"deviceCountry"
,
this
.
getCurrentCountry
());
constants
.
put
(
"uniqueId"
,
Secure
.
getString
(
this
.
reactContext
.
getContentResolver
(),
Secure
.
ANDROID_ID
));
...
...
deviceinfo.js
View file @
71796205
...
...
@@ -29,6 +29,9 @@ module.exports = {
getSystemVersion
:
function
()
{
return
RNDeviceInfo
.
systemVersion
;
},
getAPILevel
:
function
()
{
return
RNDeviceInfo
.
apiLevel
;
},
getBundleId
:
function
()
{
return
RNDeviceInfo
.
bundleId
;
},
...
...
windows/RNDeviceInfo/RNDeviceInfoModule.cs
View file @
71796205
...
...
@@ -99,6 +99,7 @@ namespace RNDeviceInfo
constants
[
"deviceName"
]
=
deviceName
;
constants
[
"systemName"
]
=
"Windows"
;
constants
[
"systemVersion"
]
=
osVersion
;
constants
[
"apiLevel"
]
=
"not available"
;
constants
[
"model"
]
=
model
;
constants
[
"brand"
]
=
model
;
constants
[
"deviceId"
]
=
hardwareVersion
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment