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
7dbb704f
Unverified
Commit
7dbb704f
authored
Nov 29, 2017
by
Gant Laborde
Committed by
GitHub
Nov 29, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #273 from akshetpandey/master
Add fallback when webview is not installed
parents
4abbe2b4
0f9b35cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
RNDeviceModule.java
...c/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
+5
-1
No files found.
android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
View file @
7dbb704f
...
...
@@ -170,7 +170,11 @@ public class RNDeviceModule extends ReactContextBaseJavaModule {
constants
.
put
(
"systemManufacturer"
,
Build
.
MANUFACTURER
);
constants
.
put
(
"bundleId"
,
packageName
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
JELLY_BEAN_MR1
)
{
constants
.
put
(
"userAgent"
,
WebSettings
.
getDefaultUserAgent
(
this
.
reactContext
));
try
{
constants
.
put
(
"userAgent"
,
WebSettings
.
getDefaultUserAgent
(
this
.
reactContext
));
}
catch
(
PackageManager
.
NameNotFoundException
e
)
{
constants
.
put
(
"userAgent"
,
System
.
getProperty
(
"http.agent"
));
}
}
constants
.
put
(
"timezone"
,
TimeZone
.
getDefault
().
getID
());
constants
.
put
(
"isEmulator"
,
this
.
isEmulator
());
...
...
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