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
9b8d6f9c
Commit
9b8d6f9c
authored
Jul 21, 2016
by
Gant Laborde
Committed by
GitHub
Jul 21, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #68 from mifi/master
Fix instructions for android
parents
12fbdb26
bab01536
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
README.md
README.md
+27
-2
No files found.
README.md
View file @
9b8d6f9c
...
...
@@ -52,9 +52,34 @@ Run your project (Cmd+R)
Run
`react-native link react-native-device-info`
in your project root.
*
register module
(in MainActivity.java)
*
register module
On React Native 0.18+:
On React Native 0.29+:
in MainApplication.java:
```
java
import
com.learnium.RNDeviceInfo.RNDeviceInfo
;
// <--- import
public
class
MainApplication
extends
Application
implements
ReactApplication
{
......
@Override
protected
List
<
ReactPackage
>
getPackages
()
{
return
Arrays
.<
ReactPackage
>
asList
(
new
RNDeviceInfo
(),
// <---- add here
new
MainReactPackage
()
);
}
......
}
```
On React Native 0.18-0.28:
in MainActivity.java:
```
java
import
com.learnium.RNDeviceInfo.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