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
78479580
Commit
78479580
authored
Sep 14, 2017
by
Gant Laborde
Committed by
GitHub
Sep 14, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #207 from DracoBlue/patch-1
Get real WebView UserAgent on Android
parents
0685f295
41d0ca9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
RNDeviceModule.java
...c/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
+2
-1
No files found.
android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
View file @
78479580
...
...
@@ -8,6 +8,7 @@ import android.content.pm.PackageManager;
import
android.content.res.Configuration
;
import
android.os.Build
;
import
android.provider.Settings.Secure
;
import
android.webkit.WebSettings
;
import
com.google.android.gms.iid.InstanceID
;
...
...
@@ -121,7 +122,7 @@ public class RNDeviceModule extends ReactContextBaseJavaModule {
constants
.
put
(
"uniqueId"
,
Secure
.
getString
(
this
.
reactContext
.
getContentResolver
(),
Secure
.
ANDROID_ID
));
constants
.
put
(
"systemManufacturer"
,
Build
.
MANUFACTURER
);
constants
.
put
(
"bundleId"
,
packageName
);
constants
.
put
(
"userAgent"
,
System
.
getProperty
(
"http.agent"
));
constants
.
put
(
"userAgent"
,
WebSettings
.
getDefaultUserAgent
(
this
.
reactContext
));
constants
.
put
(
"timezone"
,
TimeZone
.
getDefault
().
getID
());
constants
.
put
(
"isEmulator"
,
this
.
isEmulator
());
constants
.
put
(
"isTablet"
,
this
.
isTablet
());
...
...
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