SlideShare una empresa de Scribd logo
1 de 58
Descargar para leer sin conexión
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?

Más contenido relacionado

La actualidad más candente

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 GoodFITC
 
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 / GraphsRahat Khanna a.k.a mAppMechanic
 
React Native - Getting Started
React Native - Getting StartedReact Native - Getting Started
React Native - Getting StartedTracy Lee
 
An Overview of the React Ecosystem
An Overview of the React EcosystemAn Overview of the React Ecosystem
An Overview of the React EcosystemFITC
 
Introduction to React Native Workshop
Introduction to React Native WorkshopIntroduction to React Native Workshop
Introduction to React Native WorkshopIgnacio Martín
 
React Native: Introduction
React Native: IntroductionReact Native: Introduction
React Native: IntroductionInnerFood
 
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 PuppeteerPaul Jensen
 
Creating a Symfony Ecommerce App
Creating a Symfony Ecommerce AppCreating a Symfony Ecommerce App
Creating a Symfony Ecommerce AppMuhammad 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 DesignSalesforce Developers
 
Phonegap android angualr material design
Phonegap android angualr material designPhonegap android angualr material design
Phonegap android angualr material designSrinadh 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 appsYakov Fain
 
Hands on react native
Hands on react nativeHands on react native
Hands on react nativeJay 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 TitaniumAaron Saunders
 
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-animationModusJesus
 

La actualidad más candente (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 a [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 2014Gil 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 TrainingOESF Education
 
Building Top-Notch Androids SDKs
Building Top-Notch Androids SDKsBuilding Top-Notch Androids SDKs
Building Top-Notch Androids SDKsrelayr
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN StackTroy Miles
 
Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React nativeDhaval Barot
 
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 SecurityEgor 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 CocoaPodsJuan C Catalan
 
iOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersiOS Application Penetration Testing for Beginners
iOS Application Penetration Testing for BeginnersRyanISI
 
Introduction to Bitreactive
Introduction to BitreactiveIntroduction to Bitreactive
Introduction to BitreactiveGhassen Chaieb
 
Android Studio development model and.pptx
Android Studio development model and.pptxAndroid Studio development model and.pptx
Android Studio development model and.pptxVaibhavKhunger2
 

Similar a [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
 

Más de 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 RobotKobkrit 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
 
หัวใจของปัญญาประดิษฐ์ (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 PresentationKobkrit 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 AndroidKobkrit 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 #2Kobkrit 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 UnityKobkrit Viriyayudhakorn
 
Lecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR ProgrammingLecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR ProgrammingKobkrit 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
 

Más de 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
 

Último

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...chiefasafspells
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 

Último (20)

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 

[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?