Recall & Review
beginner
What is the purpose of the
react-native-device-info library?It provides easy access to device information like model, system version, unique ID, and more, helping apps adapt to different devices.
Click to reveal answer
beginner
How do you trigger a simple vibration in React Native?
Use the
Vibration.vibrate() method from the react-native module to make the device vibrate.Click to reveal answer
beginner
What is haptic feedback and why is it useful in mobile apps?
Haptic feedback is a tactile response (like vibration) that confirms user actions, improving user experience by making interactions feel more natural.
Click to reveal answer
intermediate
Name one way to get the device's unique ID in React Native.
Using
DeviceInfo.getUniqueId() from the react-native-device-info library returns a unique identifier for the device.Click to reveal answer
intermediate
What should you consider when using vibration on different devices?
Different devices support different vibration patterns and durations; also, some users may disable vibration, so always provide alternative feedback.
Click to reveal answer
Which React Native module is used to access device vibration?
✗ Incorrect
The
Vibration module in React Native controls device vibration.What does
DeviceInfo.getSystemVersion() return?✗ Incorrect
It returns the operating system version, like '14.4' for iOS or '11' for Android.
Why is haptic feedback important in mobile apps?
✗ Incorrect
Haptic feedback gives users a physical response, making interactions feel more natural.
Which of these is NOT a typical device info property?
✗ Incorrect
User passwords are private and not accessible through device info libraries.
How can you make a device vibrate for 1 second in React Native?
✗ Incorrect
Passing 1000 (milliseconds) to
Vibration.vibrate() vibrates the device for 1 second.Explain how you would use React Native to get device information and provide haptic feedback in an app.
Think about libraries and modules that give device details and how vibration can improve user experience.
You got /3 concepts.
Describe some challenges you might face when using vibration and device info across different mobile devices.
Consider how Android and iOS might behave differently and user preferences.
You got /3 concepts.