SlideShare a Scribd company logo
1 of 26
Download to read offline
UUID
Tomoki Yamashita
2014.4.9 potatotips #6
Self-Introduction
• @tomorrowkey / Tomoki Yamashita
• Android Developer at COOKPAD
• http://blog.tomorrowkey.jp / 明日の
Agenda
• What is UUID?
• How to use it in Java
• Versions of UUID
• Which version can we use in Java
• To use version 1 in Java
• To use version 1 in Android
What is UUID
What is UUID?
• Universally Unique Identifier
• RFC 4122
• Generate Unique ID without servers.
How to use in
Java
How to use it in Java
import java.util.UUID;



public class Main {

public static void main(String... args) {

UUID uuid = UUID.randomUUID();

System.out.println(“uuid=” + uuid.toString());

}

}	
#	
53da3b97-075f-4bcd-af62-148b1a7d6712
Versions of UUID
Versions of UUID
• There are 5 versions of UUID.
Version 1
• Original version
• Use time(nano-seconds) and Mac
Address
• It won't duplicate because depends on
mac address.
Version 2
• Version for DCE(Distributed
Computing Environment) Security
Version 3
• Name and MD5 Hash
• If use the same name, it duplicate.
Version 4
• Random value
• It may not duplicate.
Version 5
• Name and SHA1 Hash
• If use the same name, it duplicate.
Which version can
we use in Java?
Which version can we
use in Java?
• Version 3

UUID.nameUUIDFromBytes(byte[] name)
• Version 4

UUID.randomUUID();
To use version1
in Java
To use version1
in Java
stephenc/eaio-uuid 

https://github.com/stephenc/eaio-uuid
To use version1
in Java
build.gradle

compile ‘com.github.stephenc.eaio-uuid:uuid:3.4.0'	
Main.java

com.eaio.uuid.UUID uuid = new com.eaio.uuid.UUID();

System.out.println(“uuid=” + uuid.toString());
To use version1
in Android
To use version1
in Android
build.gradle

compile ‘com.github.stephenc.eaio-uuid:uuid:3.4.0'	
Main.java

com.eaio.uuid.UUID uuid = new com.eaio.uuid.UUID();

System.out.println(“uuid=” + uuid.toString());
To use version1
in Android
build.gradle

compile ‘com.github.stephenc.eaio-uuid:uuid:3.4.0'	
Main.java

com.eaio.uuid.UUID uuid = new com.eaio.uuid.UUID();

System.out.println(“uuid=” + uuid.toString());
NoClassDefFoundError: com.eaio.uuid.UUID
Why...?
The library use a api which is not
supported in Android.
omg.CORBA.portable.IDLEntity
To use version1
in Android
• clone eaio-uuid
• remove CORBA api from source code.
• add a permission INTERNET
End
Understand principle about UUID and
then use it.
Thank you for listening
Referred links
RFC 4122 - A Universally Unique IDentifier (UUID) URN Namespace 

http://tools.ietf.org/html/rfc4122
Universally unique identifier - Wikipedia, the free encyclopedia 

http://en.wikipedia.org/wiki/UUID#Variants_and_versions
UUIDはなぜ、分散環境で好き勝手に生成しても衝突しないのか。RFC4122規格とUUIDの性質。 ¦ 三
度の飯とエレクトロン 

http://blog.katty.in/5124

More Related Content

Similar to UUID

FLUTTER DHRUVIK.pptx
FLUTTER DHRUVIK.pptxFLUTTER DHRUVIK.pptx
FLUTTER DHRUVIK.pptxssuser5ae1f8
 
20171215 andoird-test-night
20171215 andoird-test-night20171215 andoird-test-night
20171215 andoird-test-nightKazuaki Matsuo
 
Chw00t: How to break out from various chroot solutions
Chw00t: How to break out from various chroot solutionsChw00t: How to break out from various chroot solutions
Chw00t: How to break out from various chroot solutionsBalazs Bucsay
 
What’s new in Sudo 1.8?
What’s new in Sudo 1.8?What’s new in Sudo 1.8?
What’s new in Sudo 1.8?Tyler Reese
 
Puppetcamp East, Windows Without GPOs, John Rogers, SwissRe
Puppetcamp East, Windows Without GPOs, John Rogers, SwissRePuppetcamp East, Windows Without GPOs, John Rogers, SwissRe
Puppetcamp East, Windows Without GPOs, John Rogers, SwissRePuppet
 
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Mihail Stoynov
 
Eating Fruit - Combining Robots & Apps
Eating Fruit - Combining Robots & AppsEating Fruit - Combining Robots & Apps
Eating Fruit - Combining Robots & AppsRobotGrrl
 
Introducing Ubuntu SDK
Introducing Ubuntu SDKIntroducing Ubuntu SDK
Introducing Ubuntu SDKShuduo Sang
 
Intro to GWT4Touch 2.0
Intro to GWT4Touch 2.0Intro to GWT4Touch 2.0
Intro to GWT4Touch 2.0David La Motta
 
Java overview and architecture
Java overview and architectureJava overview and architecture
Java overview and architectureWeei-Jye Chay
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to AndroidMurat Aydın
 
CNIT 128 6. Analyzing Android Applications (Part 3)
CNIT 128 6. Analyzing Android Applications (Part 3)CNIT 128 6. Analyzing Android Applications (Part 3)
CNIT 128 6. Analyzing Android Applications (Part 3)Sam Bowne
 
Android Operating System
Android Operating SystemAndroid Operating System
Android Operating SystemAmit Kundu
 
GlobalLogic Education Webinar #6: Challenges of GL Roboclub
GlobalLogic Education Webinar #6: Challenges of GL RoboclubGlobalLogic Education Webinar #6: Challenges of GL Roboclub
GlobalLogic Education Webinar #6: Challenges of GL RoboclubGlobalLogic Ukraine
 

Similar to UUID (20)

FLUTTER DHRUVIK.pptx
FLUTTER DHRUVIK.pptxFLUTTER DHRUVIK.pptx
FLUTTER DHRUVIK.pptx
 
Arduino
ArduinoArduino
Arduino
 
20171215 andoird-test-night
20171215 andoird-test-night20171215 andoird-test-night
20171215 andoird-test-night
 
Chw00t: How to break out from various chroot solutions
Chw00t: How to break out from various chroot solutionsChw00t: How to break out from various chroot solutions
Chw00t: How to break out from various chroot solutions
 
What’s new in Sudo 1.8?
What’s new in Sudo 1.8?What’s new in Sudo 1.8?
What’s new in Sudo 1.8?
 
Introduction to Frida
Introduction to FridaIntroduction to Frida
Introduction to Frida
 
Puppetcamp East, Windows Without GPOs, John Rogers, SwissRe
Puppetcamp East, Windows Without GPOs, John Rogers, SwissRePuppetcamp East, Windows Without GPOs, John Rogers, SwissRe
Puppetcamp East, Windows Without GPOs, John Rogers, SwissRe
 
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
 
Eating Fruit - Combining Robots & Apps
Eating Fruit - Combining Robots & AppsEating Fruit - Combining Robots & Apps
Eating Fruit - Combining Robots & Apps
 
Oscon 2010
Oscon 2010Oscon 2010
Oscon 2010
 
Android
AndroidAndroid
Android
 
Introducing Ubuntu SDK
Introducing Ubuntu SDKIntroducing Ubuntu SDK
Introducing Ubuntu SDK
 
Intro to GWT4Touch 2.0
Intro to GWT4Touch 2.0Intro to GWT4Touch 2.0
Intro to GWT4Touch 2.0
 
Java overview and architecture
Java overview and architectureJava overview and architecture
Java overview and architecture
 
Intro google-android
Intro google-androidIntro google-android
Intro google-android
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
 
CNIT 128 6. Analyzing Android Applications (Part 3)
CNIT 128 6. Analyzing Android Applications (Part 3)CNIT 128 6. Analyzing Android Applications (Part 3)
CNIT 128 6. Analyzing Android Applications (Part 3)
 
Android Operating System
Android Operating SystemAndroid Operating System
Android Operating System
 
A Prelude to Android
A Prelude to AndroidA Prelude to Android
A Prelude to Android
 
GlobalLogic Education Webinar #6: Challenges of GL Roboclub
GlobalLogic Education Webinar #6: Challenges of GL RoboclubGlobalLogic Education Webinar #6: Challenges of GL Roboclub
GlobalLogic Education Webinar #6: Challenges of GL Roboclub
 

More from Tomoki YAMASHITA

Few command line tools for help Android development
Few command line tools for help Android developmentFew command line tools for help Android development
Few command line tools for help Android developmentTomoki YAMASHITA
 
ぼくのビルドはにゃあとなく
ぼくのビルドはにゃあとなくぼくのビルドはにゃあとなく
ぼくのビルドはにゃあとなくTomoki YAMASHITA
 
Android Studio Pluginを使ってみた
Android Studio Pluginを使ってみたAndroid Studio Pluginを使ってみた
Android Studio Pluginを使ってみたTomoki YAMASHITA
 
Android SDK Toolsのおさらい
Android SDK ToolsのおさらいAndroid SDK Toolsのおさらい
Android SDK ToolsのおさらいTomoki YAMASHITA
 
Ndefってなんだろう
NdefってなんだろうNdefってなんだろう
NdefってなんだろうTomoki YAMASHITA
 
避けては通れないバイナリ地獄 - NDEFってなんだろう -
避けては通れないバイナリ地獄 - NDEFってなんだろう -避けては通れないバイナリ地獄 - NDEFってなんだろう -
避けては通れないバイナリ地獄 - NDEFってなんだろう -Tomoki YAMASHITA
 
Android NFCアプリハンズオン
Android NFCアプリハンズオンAndroid NFCアプリハンズオン
Android NFCアプリハンズオンTomoki YAMASHITA
 
Dialogを使うときはこうしてます
Dialogを使うときはこうしてますDialogを使うときはこうしてます
Dialogを使うときはこうしてますTomoki YAMASHITA
 

More from Tomoki YAMASHITA (10)

Few command line tools for help Android development
Few command line tools for help Android developmentFew command line tools for help Android development
Few command line tools for help Android development
 
ぼくのビルドはにゃあとなく
ぼくのビルドはにゃあとなくぼくのビルドはにゃあとなく
ぼくのビルドはにゃあとなく
 
Android Studio Pluginを使ってみた
Android Studio Pluginを使ってみたAndroid Studio Pluginを使ってみた
Android Studio Pluginを使ってみた
 
Android SDK Toolsのおさらい
Android SDK ToolsのおさらいAndroid SDK Toolsのおさらい
Android SDK Toolsのおさらい
 
What is androider
What is androiderWhat is androider
What is androider
 
Ndefってなんだろう
NdefってなんだろうNdefってなんだろう
Ndefってなんだろう
 
避けては通れないバイナリ地獄 - NDEFってなんだろう -
避けては通れないバイナリ地獄 - NDEFってなんだろう -避けては通れないバイナリ地獄 - NDEFってなんだろう -
避けては通れないバイナリ地獄 - NDEFってなんだろう -
 
Android NFCアプリハンズオン
Android NFCアプリハンズオンAndroid NFCアプリハンズオン
Android NFCアプリハンズオン
 
NFC QUEST作ったよ
NFC QUEST作ったよNFC QUEST作ったよ
NFC QUEST作ったよ
 
Dialogを使うときはこうしてます
Dialogを使うときはこうしてますDialogを使うときはこうしてます
Dialogを使うときはこうしてます
 

Recently uploaded

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 

Recently uploaded (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 

UUID

  • 2. Self-Introduction • @tomorrowkey / Tomoki Yamashita • Android Developer at COOKPAD • http://blog.tomorrowkey.jp / 明日の
  • 3. Agenda • What is UUID? • How to use it in Java • Versions of UUID • Which version can we use in Java • To use version 1 in Java • To use version 1 in Android
  • 5. What is UUID? • Universally Unique Identifier • RFC 4122 • Generate Unique ID without servers.
  • 6. How to use in Java
  • 7. How to use it in Java import java.util.UUID;
 
 public class Main {
 public static void main(String... args) {
 UUID uuid = UUID.randomUUID();
 System.out.println(“uuid=” + uuid.toString());
 }
 } # 53da3b97-075f-4bcd-af62-148b1a7d6712
  • 9. Versions of UUID • There are 5 versions of UUID.
  • 10. Version 1 • Original version • Use time(nano-seconds) and Mac Address • It won't duplicate because depends on mac address.
  • 11. Version 2 • Version for DCE(Distributed Computing Environment) Security
  • 12. Version 3 • Name and MD5 Hash • If use the same name, it duplicate.
  • 13. Version 4 • Random value • It may not duplicate.
  • 14. Version 5 • Name and SHA1 Hash • If use the same name, it duplicate.
  • 15. Which version can we use in Java?
  • 16. Which version can we use in Java? • Version 3
 UUID.nameUUIDFromBytes(byte[] name) • Version 4
 UUID.randomUUID();
  • 18. To use version1 in Java stephenc/eaio-uuid 
 https://github.com/stephenc/eaio-uuid
  • 19. To use version1 in Java build.gradle
 compile ‘com.github.stephenc.eaio-uuid:uuid:3.4.0' Main.java
 com.eaio.uuid.UUID uuid = new com.eaio.uuid.UUID();
 System.out.println(“uuid=” + uuid.toString());
  • 21. To use version1 in Android build.gradle
 compile ‘com.github.stephenc.eaio-uuid:uuid:3.4.0' Main.java
 com.eaio.uuid.UUID uuid = new com.eaio.uuid.UUID();
 System.out.println(“uuid=” + uuid.toString());
  • 22. To use version1 in Android build.gradle
 compile ‘com.github.stephenc.eaio-uuid:uuid:3.4.0' Main.java
 com.eaio.uuid.UUID uuid = new com.eaio.uuid.UUID();
 System.out.println(“uuid=” + uuid.toString()); NoClassDefFoundError: com.eaio.uuid.UUID
  • 23. Why...? The library use a api which is not supported in Android. omg.CORBA.portable.IDLEntity
  • 24. To use version1 in Android • clone eaio-uuid • remove CORBA api from source code. • add a permission INTERNET
  • 25. End Understand principle about UUID and then use it. Thank you for listening
  • 26. Referred links RFC 4122 - A Universally Unique IDentifier (UUID) URN Namespace 
 http://tools.ietf.org/html/rfc4122 Universally unique identifier - Wikipedia, the free encyclopedia 
 http://en.wikipedia.org/wiki/UUID#Variants_and_versions UUIDはなぜ、分散環境で好き勝手に生成しても衝突しないのか。RFC4122規格とUUIDの性質。 ¦ 三 度の飯とエレクトロン 
 http://blog.katty.in/5124