SlideShare a Scribd company logo
Kobkrit Viriyayudhakorn, Ph.D.
CEO of iApp Technology Limited.
kobkrit@gmail.com
http://www.kobkrit.com
Final App: Selfies
Scoreboard
Two types of React Libraries
• React Libraries have two types
• Pure JavaScript, and you only need to require it to
use.
• Non-pure JavaScript (Native Library), the JavaScript
library that rely on some native code.
• You have to include those native codes into the app.
• Otherwise, the app will throw an error as soon as
you try to use the library.
Linking with Native Library
• Why?
• Not every app uses all the native capabilities
• Including the code to support all those features
would impact the binary size.
• It is easy to add these features whenever you need
them.
Two approaches in

Native Library Linking
• Automatic Linking
• Use the react-native link command to link the
library automatically
• Manual Linking
• Open Xcode project and/or Android Studio
project to add the native library by your self.
Automatic Linking #1
• Like in the previous lecture “Map”, react-native-
map is a native library and we use the automatic
linking approach.
• Step 1. Install a library
• $|> npm install <native-library> --save
• --save or --save-dev is important! It will save the
<native-library> into package.json file. React
Native will link your lib based on dependencies
and and devDependencies in your package.json
file.
Automatic Linking #2
• Step 2. Link your native dependencies.
• $|> react-native link
• Done!
• All libraries with a native dependencies should
be successfully linked to your iOS/Android
project.
Manual Linkings
• We will do it today with the native library comes
with the react-native for opening the Camera Roll. It
is called the RCTCameraRoll Library.
• RCT is stand for ReaCT.
Simple Camera Roll App
Initialize Project
• $|> react-native init --version="0.36.0"
L10_CameraRollPicker
• $|> cd L10_CameraRollPicker
Project Setup
• To use camera roll, we need to do these two steps.
1. Declare photo library usage
2. Link the RCTCameraRoll Library
Photo Library / Camera
Usage Declaration
• In order to access user’s private data on iOS, like
location, camera roll, contacts, etc, the application
has to get the user’s permission.
• To use the camera roll, Privacy - Photo Library Usage
Description, or NSPhotoLibraryUsageDescription
and Privacy Camera Usage Description or
NSCameraUsageDecscription, should be set.
• Open the Xcode project

$|> open ios/L10_CameraRollPicker.xcodeproj
1. Click Project Name 2. Click Info
3. Click (+) button anywhere in

Custom iOS Target Properties
4. Choose 

Privacy - Photo Library Usage

Description
5. Write down the reason of accessing CameraRoll at the
Value box (If you don’t see enlarge the Xcode windows),
e.g., 

“We need to access your photos”.
6. Click (+) button anywhere in

Custom iOS Target Properties
7. Choose 

Privacy - Camera Usage

Description
8. Write down the reason of accessing Camera at the
Value box (If you don’t see enlarge the Xcode windows),
e.g., 

“We need to access your camera”.
Done. But don’t close the Xcode yet.
Link the RCTCameraRoll
Manually
• React Native, by default, not included the
RCTCameraRoll into the project.
• We need to include it by yourself.
• React native provides the ImagePickerIOS UI interface
for picking image in iOS, which we are going to use it, it
needs RCTCameraRoll.
• React native haven’t give the ImagePicker UI for
Android yet. We need to use the external library, which
we will use it soon.
Linking the RCTCameraRoll #1
• Open finder for the
location of the
RCTCameraRoll
• $|> open
node_modules/react-
native/Libraries/
CameraRoll
• In Xcode windows, in
L10_CameraRollPicker
project, expand the
icon at Libraries.
Linking the RCTCameraRoll #2
Drag the RCTCameraRoll.xcodeproj to Libraries in Xcode
Linking the RCTCameraRoll #3
< What we should see
Linking the RCTCameraRoll #4
1. Click Project Name 2. Click Build Phases
Linking the RCTCameraRoll #5
3. Click at little triangle at “Link Binary with Libraries”
4. Click +
Linking the RCTCameraRoll #6
5. Choose libRCTCameraRoll.a and Click “Add”
Done. Close the Xcode.
App Programming
• We are going to use ImagePickerIOS to choose a image,
either from.
• Using openSelectDialog() to choose the image from
Gallery.
• Using openCameraDialog() to open a camera and
make a new photo.
• And display the chosen picture on the app!
• Open atom or your favorite IDE
• $|> atom index.ios.js
ImagePickerIOS
https://facebook.github.io/react-native/docs/
imagepickerios.html
This is a very great

documentation Facebook. 

Very great documentations
L10_CameraRollPicker/1.js
L10_CameraRollPicker/1.js
ImagePickerIOS
Simulator vs Real iPhone
• In simulator, they don’t have camera, thus when we
tapped “Open from Camera”, it will have the red
screen of death.
• “Open from Gallery” works fine.
For those, who have iPhone.
• Want to run on the real iPhone? Here is the how?
• Connect iPhone into Computer via USB cable.
• Open Xcode
• $|> open ios/L10_CameraRollPicker.xcodeproj/
Change Run Scheme to
Production
• Press Command-Shift-< or Menu Bar Product >
Scheme > Edit Scheme
• Change Run Building Configuration to “Release”
Run on iPhone
• Select devices to run to your iphone.
• Press Play Button
When move back to Simulator
• Only when in “Debug” Scheme, React-Native can
re-build their app.
• Open Edit Scheme Again (Command-Shift-<) and
change back to Debug.
Run on iPhone Demo
Practical CameraRoll / Gallery
Lib for both iOS & Android.
• https://github.com/marcshilling/react-native-image-picker
• Very similar to ImagePickIOS, but can open Camera Roll /
Gallery (Android) / Camera (iOS+Android)
• Video Supports
• Support Automatic Linking :)
• https://github.com/ivpusic/react-native-image-crop-picker
• Support Choosing Multi images in both iOS and Android
• Automatic Linking as well :)
Using React-Native-Image-
Picker
• https://github.com/marcshilling/react-native-image-picker
• Installation (Automatic Linking) :)
• $|> npm install react-native-image-picker --save
• $|> react-native link
Add Permission for Android
• You need to add the following permission in 

android/app/src/main/AndroidManifest.xml

React-Native-Image-Picker
L10_CameraRollPicker/2.js
L10_CameraRollPicker/2.js
Callback Response
L10_CameraRollPicker/2.js
Platform
• Return Platform information
• Can check running mobile OS by using
Platform.OS
• “ios” for Apple iOS
• “android” ofr Google Android
L10_CameraRollPicker/2.js
iOS
L10_CameraRollPicker/2.js
Android
L10_CameraRollPicker/2.js
Without Image Picker
L10_CameraRollPicker/3.js
• We want to launch either Gallery or Camera directly
without Image Picker.
• We use the following method instead.
https://github.com/marcshilling/react-native-image-picker
L10_CameraRollPicker/3.js
L10_CameraRollPicker/3.js
L10_CameraRollPicker/3.js
Selfies Scoreboard
Modal
• A simple way to
present content above
an enclosing view.
• Can set its visibility via
visible props.
Slider
• A component used to
select a single value
from a range of values.
• Props
• maximumValue
• minimumValue
• step
L10_CameraRollPicker/4.js
We create 3 arrays of image file name in the state.
L10_CameraRollPicker/4.js
After user select image, make the modal visible.
L10_CameraRollPicker/4.js
Modal + Slider User Interface
L10_CameraRollPicker/4.js
• Push image file name into the specific chosen-star array.
• Make modal invisible
• Reset the value of slider back to 3 by default.
L10_CameraRollPicker/4.js
Image displaying part.
Selfies Scoreboard
L10_CameraRollPicker/4.js
Homework
• Make the picture in the list as the button, tap to
view it in fullscreen.
• If we push a lot of image, some of images will
placed outer the phone screen. How can we scroll
it to see all of images? Scroll View?
• When the app is killed, all data is gone. How to
save them permanently? AsyncStorage?

More Related Content

What's hot

[React-Native Tutorial] Map
[React-Native Tutorial] Map[React-Native Tutorial] Map
[React-Native Tutorial] Map
Kobkrit Viriyayudhakorn
 
Ryan Christiani I Heard React Was Good
Ryan Christiani I Heard React Was GoodRyan Christiani I Heard React Was Good
Ryan Christiani I Heard React Was Good
FITC
 
Introduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / GraphsIntroduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / Graphs
Rahat Khanna a.k.a mAppMechanic
 
React Native - Getting Started
React Native - Getting StartedReact Native - Getting Started
React Native - Getting Started
Tracy Lee
 
An Overview of the React Ecosystem
An Overview of the React EcosystemAn Overview of the React Ecosystem
An Overview of the React Ecosystem
FITC
 
Introduction to React Native Workshop
Introduction to React Native WorkshopIntroduction to React Native Workshop
Introduction to React Native Workshop
Ignacio Martín
 
React Native: Introduction
React Native: IntroductionReact Native: Introduction
React Native: Introduction
InnerFood
 
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
Paul Jensen
 
E2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
E2E testing Single Page Apps and APIs with Cucumber.js and PuppeteerE2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
E2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
Paul Jensen
 
Creating a Symfony Ecommerce App
Creating a Symfony Ecommerce AppCreating a Symfony Ecommerce App
Creating a Symfony Ecommerce App
Muhammad Azaz Qadir
 
From zero to hero with React Native!
From zero to hero with React Native!From zero to hero with React Native!
From zero to hero with React Native!
Commit University
 
Building a Lightning App with Angular Material Design
Building a Lightning App with Angular Material DesignBuilding a Lightning App with Angular Material Design
Building a Lightning App with Angular Material Design
Salesforce Developers
 
Phonegap android angualr material design
Phonegap android angualr material designPhonegap android angualr material design
Phonegap android angualr material design
Srinadh Kanugala
 
Using JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsUsing JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot apps
Yakov Fain
 
Hands on react native
Hands on react nativeHands on react native
Hands on react native
Jay Nagar
 
Quick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator TitaniumQuick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator Titanium
Aaron Saunders
 
React JS
React JSReact JS
Optimizing React Native views for pre-animation
Optimizing React Native views for pre-animationOptimizing React Native views for pre-animation
Optimizing React Native views for pre-animation
ModusJesus
 
How to React Native
How to React NativeHow to React Native
How to React Native
Dmitry Ulyanov
 

What's hot (20)

[React-Native Tutorial] Map
[React-Native Tutorial] Map[React-Native Tutorial] Map
[React-Native Tutorial] Map
 
Ryan Christiani I Heard React Was Good
Ryan Christiani I Heard React Was GoodRyan Christiani I Heard React Was Good
Ryan Christiani I Heard React Was Good
 
Introduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / GraphsIntroduction to React Native & Rendering Charts / Graphs
Introduction to React Native & Rendering Charts / Graphs
 
React Native - Getting Started
React Native - Getting StartedReact Native - Getting Started
React Native - Getting Started
 
An Overview of the React Ecosystem
An Overview of the React EcosystemAn Overview of the React Ecosystem
An Overview of the React Ecosystem
 
Introduction to React Native Workshop
Introduction to React Native WorkshopIntroduction to React Native Workshop
Introduction to React Native Workshop
 
React Native: Introduction
React Native: IntroductionReact Native: Introduction
React Native: Introduction
 
Google app engine
Google app engineGoogle app engine
Google app engine
 
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
 
E2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
E2E testing Single Page Apps and APIs with Cucumber.js and PuppeteerE2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
E2E testing Single Page Apps and APIs with Cucumber.js and Puppeteer
 
Creating a Symfony Ecommerce App
Creating a Symfony Ecommerce AppCreating a Symfony Ecommerce App
Creating a Symfony Ecommerce App
 
From zero to hero with React Native!
From zero to hero with React Native!From zero to hero with React Native!
From zero to hero with React Native!
 
Building a Lightning App with Angular Material Design
Building a Lightning App with Angular Material DesignBuilding a Lightning App with Angular Material Design
Building a Lightning App with Angular Material Design
 
Phonegap android angualr material design
Phonegap android angualr material designPhonegap android angualr material design
Phonegap android angualr material design
 
Using JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsUsing JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot apps
 
Hands on react native
Hands on react nativeHands on react native
Hands on react native
 
Quick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator TitaniumQuick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator Titanium
 
React JS
React JSReact JS
React JS
 
Optimizing React Native views for pre-animation
Optimizing React Native views for pre-animationOptimizing React Native views for pre-animation
Optimizing React Native views for pre-animation
 
How to React Native
How to React NativeHow to React Native
How to React Native
 

Similar to [React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by Making Selfies Scoreboard Apps.

Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Gil Irizarry
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium IntroNicholas Jansma
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps QuicklyGil Irizarry
 
Android Application WebAPI Development Training
Android Application WebAPI Development TrainingAndroid Application WebAPI Development Training
Android Application WebAPI Development Training
OESF Education
 
Building Top-Notch Androids SDKs
Building Top-Notch Androids SDKsBuilding Top-Notch Androids SDKs
Building Top-Notch Androids SDKs
relayr
 
Glide usage tips
Glide usage tipsGlide usage tips
Glide usage tips
LINE Corporation
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
Troy Miles
 
Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React native
Dhaval Barot
 
Make it compatible
Make it compatibleMake it compatible
Make it compatible
Keishin Yokomaku
 
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
Daniel Gallego Vico
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
Egor Tolstoy
 
WebObjects Developer Tools
WebObjects Developer ToolsWebObjects Developer Tools
WebObjects Developer ToolsWO Community
 
Manage your external libraries with CocoaPods
Manage your external libraries with CocoaPodsManage your external libraries with CocoaPods
Manage your external libraries with CocoaPods
Juan C Catalan
 
Gradle Again
Gradle AgainGradle Again
Gradle Again
Eugen Martynov
 
iOS Application Exploitation
iOS Application ExploitationiOS Application Exploitation
iOS Application Exploitation
Positive Hack Days
 
React nativebeginner1
React nativebeginner1React nativebeginner1
React nativebeginner1
Oswald Campesato
 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for Beginners
RyanISI
 
Introduction to Bitreactive
Introduction to BitreactiveIntroduction to Bitreactive
Introduction to Bitreactive
Ghassen Chaieb
 
Android Studio development model and.pptx
Android Studio development model and.pptxAndroid Studio development model and.pptx
Android Studio development model and.pptx
VaibhavKhunger2
 

Similar to [React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by Making Selfies Scoreboard Apps. (20)

Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps Quickly
 
Android Application WebAPI Development Training
Android Application WebAPI Development TrainingAndroid Application WebAPI Development Training
Android Application WebAPI Development Training
 
Building Top-Notch Androids SDKs
Building Top-Notch Androids SDKsBuilding Top-Notch Androids SDKs
Building Top-Notch Androids SDKs
 
Glide usage tips
Glide usage tipsGlide usage tips
Glide usage tips
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React native
 
Make it compatible
Make it compatibleMake it compatible
Make it compatible
 
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
Droidcon Spain 2105 - One app to rule them all: Methodologies, Tools & Tricks...
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
 
WebObjects Developer Tools
WebObjects Developer ToolsWebObjects Developer Tools
WebObjects Developer Tools
 
Manage your external libraries with CocoaPods
Manage your external libraries with CocoaPodsManage your external libraries with CocoaPods
Manage your external libraries with CocoaPods
 
Gradle Again
Gradle AgainGradle Again
Gradle Again
 
iOS Application Exploitation
iOS Application ExploitationiOS Application Exploitation
iOS Application Exploitation
 
React nativebeginner1
React nativebeginner1React nativebeginner1
React nativebeginner1
 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for Beginners
 
Introduction to Bitreactive
Introduction to BitreactiveIntroduction to Bitreactive
Introduction to Bitreactive
 
Android Studio development model and.pptx
Android Studio development model and.pptxAndroid Studio development model and.pptx
Android Studio development model and.pptx
 
tut0000021-hevery
tut0000021-heverytut0000021-hevery
tut0000021-hevery
 

More from Kobkrit Viriyayudhakorn

Thai E-Voting System
Thai E-Voting System Thai E-Voting System
Thai E-Voting System
Kobkrit Viriyayudhakorn
 
Thai National ID Card OCR
Thai National ID Card OCRThai National ID Card OCR
Thai National ID Card OCR
Kobkrit Viriyayudhakorn
 
Chochae Robot - Thai voice communication extension pack for Service Robot
Chochae Robot - Thai voice communication extension pack for Service RobotChochae Robot - Thai voice communication extension pack for Service Robot
Chochae Robot - Thai voice communication extension pack for Service Robot
Kobkrit Viriyayudhakorn
 
ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...
ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...
ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...
Kobkrit Viriyayudhakorn
 
Thai Text processing by Transfer Learning using Transformer (Bert)
Thai Text processing by Transfer Learning using Transformer (Bert)Thai Text processing by Transfer Learning using Transformer (Bert)
Thai Text processing by Transfer Learning using Transformer (Bert)
Kobkrit Viriyayudhakorn
 
How Emoticon Affects Chatbot Users
How Emoticon Affects Chatbot UsersHow Emoticon Affects Chatbot Users
How Emoticon Affects Chatbot Users
Kobkrit Viriyayudhakorn
 
หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)
หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)
หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)
Kobkrit Viriyayudhakorn
 
Check Raka Chatbot Pitching Presentation
Check Raka Chatbot Pitching PresentationCheck Raka Chatbot Pitching Presentation
Check Raka Chatbot Pitching Presentation
Kobkrit Viriyayudhakorn
 
[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)
[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)
[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)
Kobkrit Viriyayudhakorn
 
[Lecture 4] AI and Deep Learning: Neural Network (Theory)
[Lecture 4] AI and Deep Learning: Neural Network (Theory)[Lecture 4] AI and Deep Learning: Neural Network (Theory)
[Lecture 4] AI and Deep Learning: Neural Network (Theory)
Kobkrit Viriyayudhakorn
 
[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)
[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)
[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)
Kobkrit Viriyayudhakorn
 
ITS488 Lecture 6: Music and Sound Effect & GVR Try out.
ITS488 Lecture 6: Music and Sound Effect & GVR Try out.ITS488 Lecture 6: Music and Sound Effect & GVR Try out.
ITS488 Lecture 6: Music and Sound Effect & GVR Try out.
Kobkrit Viriyayudhakorn
 
Unity Google VR Cardboard Deployment on iOS and Android
Unity Google VR Cardboard Deployment on iOS and AndroidUnity Google VR Cardboard Deployment on iOS and Android
Unity Google VR Cardboard Deployment on iOS and Android
Kobkrit Viriyayudhakorn
 
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
Kobkrit Viriyayudhakorn
 
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Kobkrit Viriyayudhakorn
 
Lecture 2: C# Programming for VR application in Unity
Lecture 2: C# Programming for VR application in UnityLecture 2: C# Programming for VR application in Unity
Lecture 2: C# Programming for VR application in Unity
Kobkrit Viriyayudhakorn
 
Lecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR ProgrammingLecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR Programming
Kobkrit Viriyayudhakorn
 
Thai Word Embedding with Tensorflow
Thai Word Embedding with Tensorflow Thai Word Embedding with Tensorflow
Thai Word Embedding with Tensorflow
Kobkrit Viriyayudhakorn
 
สร้างซอฟต์แวร์อย่างไรให้โดนใจผู้คน (How to make software that people love)
สร้างซอฟต์แวร์อย่างไรให้โดนใจผู้คน (How to make software that people love)สร้างซอฟต์แวร์อย่างไรให้โดนใจผู้คน (How to make software that people love)
สร้างซอฟต์แวร์อย่างไรให้โดนใจผู้คน (How to make software that people love)
Kobkrit Viriyayudhakorn
 
Startup Pitching and Mobile App Startup
Startup Pitching and Mobile App StartupStartup Pitching and Mobile App Startup
Startup Pitching and Mobile App Startup
Kobkrit Viriyayudhakorn
 

More from Kobkrit Viriyayudhakorn (20)

Thai E-Voting System
Thai E-Voting System Thai E-Voting System
Thai E-Voting System
 
Thai National ID Card OCR
Thai National ID Card OCRThai National ID Card OCR
Thai National ID Card OCR
 
Chochae Robot - Thai voice communication extension pack for Service Robot
Chochae Robot - Thai voice communication extension pack for Service RobotChochae Robot - Thai voice communication extension pack for Service Robot
Chochae Robot - Thai voice communication extension pack for Service Robot
 
ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...
ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...
ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...
 
Thai Text processing by Transfer Learning using Transformer (Bert)
Thai Text processing by Transfer Learning using Transformer (Bert)Thai Text processing by Transfer Learning using Transformer (Bert)
Thai Text processing by Transfer Learning using Transformer (Bert)
 
How Emoticon Affects Chatbot Users
How Emoticon Affects Chatbot UsersHow Emoticon Affects Chatbot Users
How Emoticon Affects Chatbot Users
 
หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)
หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)
หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)
 
Check Raka Chatbot Pitching Presentation
Check Raka Chatbot Pitching PresentationCheck Raka Chatbot Pitching Presentation
Check Raka Chatbot Pitching Presentation
 
[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)
[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)
[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)
 
[Lecture 4] AI and Deep Learning: Neural Network (Theory)
[Lecture 4] AI and Deep Learning: Neural Network (Theory)[Lecture 4] AI and Deep Learning: Neural Network (Theory)
[Lecture 4] AI and Deep Learning: Neural Network (Theory)
 
[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)
[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)
[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)
 
ITS488 Lecture 6: Music and Sound Effect & GVR Try out.
ITS488 Lecture 6: Music and Sound Effect & GVR Try out.ITS488 Lecture 6: Music and Sound Effect & GVR Try out.
ITS488 Lecture 6: Music and Sound Effect & GVR Try out.
 
Unity Google VR Cardboard Deployment on iOS and Android
Unity Google VR Cardboard Deployment on iOS and AndroidUnity Google VR Cardboard Deployment on iOS and Android
Unity Google VR Cardboard Deployment on iOS and Android
 
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
 
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
 
Lecture 2: C# Programming for VR application in Unity
Lecture 2: C# Programming for VR application in UnityLecture 2: C# Programming for VR application in Unity
Lecture 2: C# Programming for VR application in Unity
 
Lecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR ProgrammingLecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR Programming
 
Thai Word Embedding with Tensorflow
Thai Word Embedding with Tensorflow Thai Word Embedding with Tensorflow
Thai Word Embedding with Tensorflow
 
สร้างซอฟต์แวร์อย่างไรให้โดนใจผู้คน (How to make software that people love)
สร้างซอฟต์แวร์อย่างไรให้โดนใจผู้คน (How to make software that people love)สร้างซอฟต์แวร์อย่างไรให้โดนใจผู้คน (How to make software that people love)
สร้างซอฟต์แวร์อย่างไรให้โดนใจผู้คน (How to make software that people love)
 
Startup Pitching and Mobile App Startup
Startup Pitching and Mobile App StartupStartup Pitching and Mobile App Startup
Startup Pitching and Mobile App Startup
 

Recently uploaded

OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 

Recently uploaded (20)

OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 

[React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by Making Selfies Scoreboard Apps.

  • 1. Kobkrit Viriyayudhakorn, Ph.D. CEO of iApp Technology Limited. kobkrit@gmail.com http://www.kobkrit.com
  • 3. Two types of React Libraries • React Libraries have two types • Pure JavaScript, and you only need to require it to use. • Non-pure JavaScript (Native Library), the JavaScript library that rely on some native code. • You have to include those native codes into the app. • Otherwise, the app will throw an error as soon as you try to use the library.
  • 4. Linking with Native Library • Why? • Not every app uses all the native capabilities • Including the code to support all those features would impact the binary size. • It is easy to add these features whenever you need them.
  • 5. Two approaches in
 Native Library Linking • Automatic Linking • Use the react-native link command to link the library automatically • Manual Linking • Open Xcode project and/or Android Studio project to add the native library by your self.
  • 6. Automatic Linking #1 • Like in the previous lecture “Map”, react-native- map is a native library and we use the automatic linking approach. • Step 1. Install a library • $|> npm install <native-library> --save • --save or --save-dev is important! It will save the <native-library> into package.json file. React Native will link your lib based on dependencies and and devDependencies in your package.json file.
  • 7. Automatic Linking #2 • Step 2. Link your native dependencies. • $|> react-native link • Done! • All libraries with a native dependencies should be successfully linked to your iOS/Android project.
  • 8. Manual Linkings • We will do it today with the native library comes with the react-native for opening the Camera Roll. It is called the RCTCameraRoll Library. • RCT is stand for ReaCT.
  • 10. Initialize Project • $|> react-native init --version="0.36.0" L10_CameraRollPicker • $|> cd L10_CameraRollPicker
  • 11. Project Setup • To use camera roll, we need to do these two steps. 1. Declare photo library usage 2. Link the RCTCameraRoll Library
  • 12. Photo Library / Camera Usage Declaration • In order to access user’s private data on iOS, like location, camera roll, contacts, etc, the application has to get the user’s permission. • To use the camera roll, Privacy - Photo Library Usage Description, or NSPhotoLibraryUsageDescription and Privacy Camera Usage Description or NSCameraUsageDecscription, should be set. • Open the Xcode project
 $|> open ios/L10_CameraRollPicker.xcodeproj
  • 13. 1. Click Project Name 2. Click Info
  • 14. 3. Click (+) button anywhere in
 Custom iOS Target Properties 4. Choose 
 Privacy - Photo Library Usage
 Description
  • 15. 5. Write down the reason of accessing CameraRoll at the Value box (If you don’t see enlarge the Xcode windows), e.g., 
 “We need to access your photos”.
  • 16. 6. Click (+) button anywhere in
 Custom iOS Target Properties 7. Choose 
 Privacy - Camera Usage
 Description
  • 17. 8. Write down the reason of accessing Camera at the Value box (If you don’t see enlarge the Xcode windows), e.g., 
 “We need to access your camera”. Done. But don’t close the Xcode yet.
  • 18. Link the RCTCameraRoll Manually • React Native, by default, not included the RCTCameraRoll into the project. • We need to include it by yourself. • React native provides the ImagePickerIOS UI interface for picking image in iOS, which we are going to use it, it needs RCTCameraRoll. • React native haven’t give the ImagePicker UI for Android yet. We need to use the external library, which we will use it soon.
  • 19. Linking the RCTCameraRoll #1 • Open finder for the location of the RCTCameraRoll • $|> open node_modules/react- native/Libraries/ CameraRoll • In Xcode windows, in L10_CameraRollPicker project, expand the icon at Libraries.
  • 20. Linking the RCTCameraRoll #2 Drag the RCTCameraRoll.xcodeproj to Libraries in Xcode
  • 21. Linking the RCTCameraRoll #3 < What we should see
  • 22. Linking the RCTCameraRoll #4 1. Click Project Name 2. Click Build Phases
  • 23. Linking the RCTCameraRoll #5 3. Click at little triangle at “Link Binary with Libraries” 4. Click +
  • 24. Linking the RCTCameraRoll #6 5. Choose libRCTCameraRoll.a and Click “Add” Done. Close the Xcode.
  • 25. App Programming • We are going to use ImagePickerIOS to choose a image, either from. • Using openSelectDialog() to choose the image from Gallery. • Using openCameraDialog() to open a camera and make a new photo. • And display the chosen picture on the app! • Open atom or your favorite IDE • $|> atom index.ios.js
  • 26. ImagePickerIOS https://facebook.github.io/react-native/docs/ imagepickerios.html This is a very great
 documentation Facebook. 
 Very great documentations
  • 30. Simulator vs Real iPhone • In simulator, they don’t have camera, thus when we tapped “Open from Camera”, it will have the red screen of death. • “Open from Gallery” works fine.
  • 31. For those, who have iPhone. • Want to run on the real iPhone? Here is the how? • Connect iPhone into Computer via USB cable. • Open Xcode • $|> open ios/L10_CameraRollPicker.xcodeproj/
  • 32. Change Run Scheme to Production • Press Command-Shift-< or Menu Bar Product > Scheme > Edit Scheme • Change Run Building Configuration to “Release”
  • 33. Run on iPhone • Select devices to run to your iphone. • Press Play Button
  • 34. When move back to Simulator • Only when in “Debug” Scheme, React-Native can re-build their app. • Open Edit Scheme Again (Command-Shift-<) and change back to Debug.
  • 36. Practical CameraRoll / Gallery Lib for both iOS & Android. • https://github.com/marcshilling/react-native-image-picker • Very similar to ImagePickIOS, but can open Camera Roll / Gallery (Android) / Camera (iOS+Android) • Video Supports • Support Automatic Linking :) • https://github.com/ivpusic/react-native-image-crop-picker • Support Choosing Multi images in both iOS and Android • Automatic Linking as well :)
  • 37. Using React-Native-Image- Picker • https://github.com/marcshilling/react-native-image-picker • Installation (Automatic Linking) :) • $|> npm install react-native-image-picker --save • $|> react-native link
  • 38. Add Permission for Android • You need to add the following permission in 
 android/app/src/main/AndroidManifest.xml

  • 42. Platform • Return Platform information • Can check running mobile OS by using Platform.OS • “ios” for Apple iOS • “android” ofr Google Android L10_CameraRollPicker/2.js
  • 45. Without Image Picker L10_CameraRollPicker/3.js • We want to launch either Gallery or Camera directly without Image Picker. • We use the following method instead. https://github.com/marcshilling/react-native-image-picker
  • 50. Modal • A simple way to present content above an enclosing view. • Can set its visibility via visible props.
  • 51. Slider • A component used to select a single value from a range of values. • Props • maximumValue • minimumValue • step
  • 52. L10_CameraRollPicker/4.js We create 3 arrays of image file name in the state.
  • 53. L10_CameraRollPicker/4.js After user select image, make the modal visible.
  • 55. L10_CameraRollPicker/4.js • Push image file name into the specific chosen-star array. • Make modal invisible • Reset the value of slider back to 3 by default.
  • 58. Homework • Make the picture in the list as the button, tap to view it in fullscreen. • If we push a lot of image, some of images will placed outer the phone screen. How can we scroll it to see all of images? Scroll View? • When the app is killed, all data is gone. How to save them permanently? AsyncStorage?