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
4214f396
Commit
4214f396
authored
Jan 08, 2016
by
Rebecca Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update documentation for RN 0.18+
parent
bc435a72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
README.md
README.md
+23
-0
No files found.
README.md
View file @
4214f396
...
...
@@ -44,6 +44,29 @@ dependencies {
*
register module (in MainActivity.java)
On newer versions of React Native (0.18+):
```
java
import
com.learnium.RNDeviceInfo.*
;
// <--- import
public
class
MainActivity
extends
ReactActivity
{
......
/**
* A list of packages used by the app. If the app uses additional views
* or modules besides the default ones, add more packages here.
*/
@Override
protected
List
<
ReactPackage
>
getPackages
()
{
return
Arrays
.<
ReactPackage
>
asList
(
new
RNDeviceInfo
(),
// <------ add here
new
MainReactPackage
());
}
}
```
On older versions of React Native:
```
java
import
com.learnium.RNDeviceInfo.*
;
// <--- import
...
...
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