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
5d1ea2a3
Commit
5d1ea2a3
authored
Dec 08, 2015
by
Rebecca Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak some device name stuff and readme
parent
1c6d1e04
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
README.md
README.md
+9
-0
RNDeviceModule.java
...c/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
+1
-0
No files found.
README.md
View file @
5d1ea2a3
...
...
@@ -75,6 +75,13 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
(Thanks to @chirag04 for writing the instructions)
*
If you want to get the device name in Android add this to your AndroidManifest.xml
```
xml
...
<uses-permission
android:name=
"android.permission.BLUETOOTH"
/>
```
## Release Notes
0.
5.0 adds a new parameter; Device Id. On iOS this is the hardware string for the current device (e.g.
...
...
@@ -107,4 +114,6 @@ console.log("App Version", DeviceInfo.getVersion()); // e.g. 1.1.0
console
.
log
(
"App Version (Readable)"
,
DeviceInfo
.
getReadableVersion
());
// e.g. 1.1.0.89
console
.
log
(
"Device Name"
,
DeviceInfo
.
getDeviceName
());
// e.g. Becca's iPhone 6
```
android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java
View file @
5d1ea2a3
...
...
@@ -13,6 +13,7 @@ import android.os.Build;
import
android.provider.Settings.Secure
;
import
android.content.pm.PackageManager
;
import
android.content.pm.PackageInfo
;
import
android.bluetooth.BluetoothAdapter
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
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