SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
SOCIAL SHARING USING
NOKIA ASHA SDK 1.1
(BETA)
Pranav Gothadiya
Product Owner
Nokia Asha SDK
pranav.gothadiya@nokia.com
CONTENTS
•
•
•
•

•
•
•

Introduction to Social Sharing
What is Share API?
Using Share API
Application development using Share API
- Share contents from MIDlet
- Share contents from other apps
- Fastlane integration
Oauth 2.0
Emoji Support
Additional Information
INTRODUCTION TO SOCIAL SHARING
•
•
•
•

Sharing content with social media
Built-in feature of Share API through content handler
Oauth 2.0 based authentication support
Use unicode base emoticons in content sharing
WHAT IS SHARE API ?
•
•
•
•

Its a convenient overlay to JSR-211 for simple social sharing
of content
Platform implements this social sharing support
Content handled either by content type/content handler ID
Application development:
- Implementing source for sharing
- Implementing destination for sharing
APPLICATION SIDE IMPLEMENTATION
Code snippet:
String[] args = new String[]{"text=" + this.sharedText.getString()};
String mime = "text/plain";
Registry registry = Registry.getRegistry(this.getClass().getName());
Invocation invocation = new Invocation(null, mime, "com.nokia.share");
invocation.setAction("share");
invocation.setArgs(args);
invocation.setResponseRequired(false);
registry.invoke(invocation);
SUPPORTED ARGUMENTS
•

url: url
-

The url to the file that is being shared (many supported) n
This is used when the shared items are files

String[] args = new String[]{“url=file:///Phone/_my_picture/img1.png"};
SUPPORTED ARGUMENTS
•

url: url
-

•

The url to the file that is being shared (many supported) n. This is used
when the shared items are files

text: text
-

Textual content that is being shared
This is used when the shared items are texts

String[] args =
new String[]{"text=file:///Phone/_my_picture/img1.png"};
SUPPORTED ARGUMENTS
•

url: url
-

•

The url to the file that is being shared (many supported) n. This is
used when the shared items are files

text: text
-

Textual content that is being shared. This is used when the shared
items are texts

For Fastlane integration
• id
-

A unique identifier of the share transaction.
It can be stored for future reference.
Used with “open-shared” action.
SUPPORTED SHARE TYPES
Following mime types can be registered:
•
•
•
•

image/* or specific image types
audio/* or specific audio types
video/* or specific video types
text/plain type

“No limit on size or types by the Share API, but there might be limitations on the individual share
destinations”
SHARE CONTENTS FROM MIDLET
•
•
•
•
•

Generate arguments to pass content
Specify mime type of the content
Get content handler Registry
Create invocation
Invoke
SHARE CONTENTS FROM OTHER APPLICATIONS
•
•
•
•
•

Make JAD entry for content handler
Create ContentHandlerServer
Get Invocation from content handler server
Get the arguments (content)
Use content to share
CONTENT INVOCATION
Content can be invoked from following native apps:
• Sharing link and bookmark from Browser
• Sharing files from:
- Gallery
- Music player
- Video player
- Camera
• Sharing contacts and calendars
FAST LANE INTEGRATION
•
•
•

Destination must register to action "open-shared“
Destination can deep link the user into the right view
Fastlane item is added if the destination returns with Invocation.OK
handler.finish(invocation, Invocation.OK);

•

Fastlane item is added if the destination returns Invocation.CANCELLED and quit
contentHandlerServer.finish(invocation, Invocation.CANCELLED);

•

Share UI considers that sharing has ended, but does not create a Fastlane item
because the sharing was not completed
contentHandlerServer.finish(invocation, Invocation. INITIATED);
OAUTH 2.0 SUPPORT
•
•
•
•
•

Allows to access server resources on behalf of the resource owner
Secure open authorization protocol
Authentication handled by Nokia browser
Invocation happens through Content Handler
Browser
- Performs Oauth 2.0 based authentication
- Get back the access token
- MIDlet app to use that access token further
OAUTH 2.0 IMPLEMENTATION

22 November 2013 / Slide no 15
EMOJI SUPPORT
•
•
•

•

•

Japanese term which represents a picture
It expresses an visual/idea in messaging
Standard Unicode set:
- Large number of emoji chars
- Range: U+1F300 to 1F64F
Surrogate pair:
- Maps an emoji character to a pictograph
- Nokia Asha Platform has built-in implementation
Back to UTF16 char:
- While reading the char from Java text component
EMOJI SUPPORT - IMPLEMENTATION
•

Constants

•

Create surrogate par from Unicode character

•

Get Unicode character back from surrogate pair
MORE INFORMATION
Overview
- http://developer.nokia.com/Develop/asha/java/start/
Downloads
- http://developer.nokia.com/Develop/asha/java/tools.xhtml
- http://projects.developer.nokia.com/LWUIT_for_Series_40
Guides
- Nokia Asha Design Guide: http://developer.nokia.com/Resources/Library/Asha_UI/
- Porting Guide: http://developer.nokia.com/Resources/Library/Porting_to_Nokia_Asha/
- Documentation: http://developer.nokia.com/Develop/asha/java/resources/docs/
- Training Videos: http://developer.nokia.com/Develop/asha/learning.xhtml
- Code Examples: http://developer.nokia.com/Develop/asha/java/resources/code/
THANK YOU.
QUESTIONS?
For more information:
https://developer.nokia.com/Develop/asha/learning.xhtml

Contenu connexe

Plus de Microsoft Mobile Developer

Location based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagLocation based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagMicrosoft Mobile Developer
 
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsLumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsMicrosoft Mobile Developer
 
Windows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appWindows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appMicrosoft Mobile Developer
 
La pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeLa pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeMicrosoft Mobile Developer
 
Il pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoIl pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoMicrosoft Mobile Developer
 
Lens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocameraLens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocameraMicrosoft Mobile Developer
 
Nokia Asha webinar: Developing health-care applications for Nokia Asha phones
Nokia Asha webinar: Developing health-care applications for Nokia Asha phonesNokia Asha webinar: Developing health-care applications for Nokia Asha phones
Nokia Asha webinar: Developing health-care applications for Nokia Asha phonesMicrosoft Mobile Developer
 
Nokia Asha webinar: Add VoIP services to your Nokia Asha apps
Nokia Asha webinar: Add VoIP services to your Nokia Asha appsNokia Asha webinar: Add VoIP services to your Nokia Asha apps
Nokia Asha webinar: Add VoIP services to your Nokia Asha appsMicrosoft Mobile Developer
 
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0Microsoft Mobile Developer
 
Nokia Asha webinar: Developing location-based services for Nokia Asha phones ...
Nokia Asha webinar: Developing location-based services for Nokia Asha phones ...Nokia Asha webinar: Developing location-based services for Nokia Asha phones ...
Nokia Asha webinar: Developing location-based services for Nokia Asha phones ...Microsoft Mobile Developer
 
Sviluppare una live app notifiche, live tile, lock screen
Sviluppare una live app notifiche, live tile, lock screenSviluppare una live app notifiche, live tile, lock screen
Sviluppare una live app notifiche, live tile, lock screenMicrosoft Mobile Developer
 

Plus de Microsoft Mobile Developer (20)

Location based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tagLocation based services for Nokia X and Nokia Asha using Geo2tag
Location based services for Nokia X and Nokia Asha using Geo2tag
 
HERE Maps for the Nokia X platform
HERE Maps for the Nokia X platformHERE Maps for the Nokia X platform
HERE Maps for the Nokia X platform
 
Nokia In-App Payment - UX considerations
Nokia In-App Payment - UX considerationsNokia In-App Payment - UX considerations
Nokia In-App Payment - UX considerations
 
UX considerations when porting to Nokia X
UX considerations when porting to Nokia XUX considerations when porting to Nokia X
UX considerations when porting to Nokia X
 
Kids' games and educational app design
Kids' games and educational app designKids' games and educational app design
Kids' games and educational app design
 
Nokia X: opportunities for developers
Nokia X: opportunities for developersNokia X: opportunities for developers
Nokia X: opportunities for developers
 
Lumia App Labs: Nokia Imaging SDK 1.1
Lumia App Labs: Nokia Imaging SDK 1.1Lumia App Labs: Nokia Imaging SDK 1.1
Lumia App Labs: Nokia Imaging SDK 1.1
 
Intro to Nokia X software platform and tools
Intro to Nokia X software platform and toolsIntro to Nokia X software platform and tools
Intro to Nokia X software platform and tools
 
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultationsLumia App Labs: Lessons learned from 50 windows phone 8 design consultations
Lumia App Labs: Lessons learned from 50 windows phone 8 design consultations
 
Windows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra appWindows Phone 8 speech: parliamo con la nostra app
Windows Phone 8 speech: parliamo con la nostra app
 
La pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo storeLa pubblicazione di un'applicazione sullo store
La pubblicazione di un'applicazione sullo store
 
Il pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progettoIl pattern mvvm come strutturare al meglio il vostro progetto
Il pattern mvvm come strutturare al meglio il vostro progetto
 
Lens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocameraLens app trasformare il telefono in una fotocamera
Lens app trasformare il telefono in una fotocamera
 
NFC, Bluetooth e comunicazione tra app
NFC, Bluetooth e comunicazione tra appNFC, Bluetooth e comunicazione tra app
NFC, Bluetooth e comunicazione tra app
 
Nokia Asha webinar: Developing health-care applications for Nokia Asha phones
Nokia Asha webinar: Developing health-care applications for Nokia Asha phonesNokia Asha webinar: Developing health-care applications for Nokia Asha phones
Nokia Asha webinar: Developing health-care applications for Nokia Asha phones
 
Connettersi al Cloud Azure Mobile Services
Connettersi al Cloud Azure Mobile ServicesConnettersi al Cloud Azure Mobile Services
Connettersi al Cloud Azure Mobile Services
 
Nokia Asha webinar: Add VoIP services to your Nokia Asha apps
Nokia Asha webinar: Add VoIP services to your Nokia Asha appsNokia Asha webinar: Add VoIP services to your Nokia Asha apps
Nokia Asha webinar: Add VoIP services to your Nokia Asha apps
 
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
LUMIA APP LABS #18: INTRODUCING NOKIA IMAGING SDK 1.0
 
Nokia Asha webinar: Developing location-based services for Nokia Asha phones ...
Nokia Asha webinar: Developing location-based services for Nokia Asha phones ...Nokia Asha webinar: Developing location-based services for Nokia Asha phones ...
Nokia Asha webinar: Developing location-based services for Nokia Asha phones ...
 
Sviluppare una live app notifiche, live tile, lock screen
Sviluppare una live app notifiche, live tile, lock screenSviluppare una live app notifiche, live tile, lock screen
Sviluppare una live app notifiche, live tile, lock screen
 

Dernier

Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 

Dernier (20)

Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 

Nokia Asha webinar: New API for social sharing in Nokia Asha SDK 1.1

  • 1. SOCIAL SHARING USING NOKIA ASHA SDK 1.1 (BETA) Pranav Gothadiya Product Owner Nokia Asha SDK pranav.gothadiya@nokia.com
  • 2. CONTENTS • • • • • • • Introduction to Social Sharing What is Share API? Using Share API Application development using Share API - Share contents from MIDlet - Share contents from other apps - Fastlane integration Oauth 2.0 Emoji Support Additional Information
  • 3. INTRODUCTION TO SOCIAL SHARING • • • • Sharing content with social media Built-in feature of Share API through content handler Oauth 2.0 based authentication support Use unicode base emoticons in content sharing
  • 4. WHAT IS SHARE API ? • • • • Its a convenient overlay to JSR-211 for simple social sharing of content Platform implements this social sharing support Content handled either by content type/content handler ID Application development: - Implementing source for sharing - Implementing destination for sharing
  • 5. APPLICATION SIDE IMPLEMENTATION Code snippet: String[] args = new String[]{"text=" + this.sharedText.getString()}; String mime = "text/plain"; Registry registry = Registry.getRegistry(this.getClass().getName()); Invocation invocation = new Invocation(null, mime, "com.nokia.share"); invocation.setAction("share"); invocation.setArgs(args); invocation.setResponseRequired(false); registry.invoke(invocation);
  • 6. SUPPORTED ARGUMENTS • url: url - The url to the file that is being shared (many supported) n This is used when the shared items are files String[] args = new String[]{“url=file:///Phone/_my_picture/img1.png"};
  • 7. SUPPORTED ARGUMENTS • url: url - • The url to the file that is being shared (many supported) n. This is used when the shared items are files text: text - Textual content that is being shared This is used when the shared items are texts String[] args = new String[]{"text=file:///Phone/_my_picture/img1.png"};
  • 8. SUPPORTED ARGUMENTS • url: url - • The url to the file that is being shared (many supported) n. This is used when the shared items are files text: text - Textual content that is being shared. This is used when the shared items are texts For Fastlane integration • id - A unique identifier of the share transaction. It can be stored for future reference. Used with “open-shared” action.
  • 9. SUPPORTED SHARE TYPES Following mime types can be registered: • • • • image/* or specific image types audio/* or specific audio types video/* or specific video types text/plain type “No limit on size or types by the Share API, but there might be limitations on the individual share destinations”
  • 10. SHARE CONTENTS FROM MIDLET • • • • • Generate arguments to pass content Specify mime type of the content Get content handler Registry Create invocation Invoke
  • 11. SHARE CONTENTS FROM OTHER APPLICATIONS • • • • • Make JAD entry for content handler Create ContentHandlerServer Get Invocation from content handler server Get the arguments (content) Use content to share
  • 12. CONTENT INVOCATION Content can be invoked from following native apps: • Sharing link and bookmark from Browser • Sharing files from: - Gallery - Music player - Video player - Camera • Sharing contacts and calendars
  • 13. FAST LANE INTEGRATION • • • Destination must register to action "open-shared“ Destination can deep link the user into the right view Fastlane item is added if the destination returns with Invocation.OK handler.finish(invocation, Invocation.OK); • Fastlane item is added if the destination returns Invocation.CANCELLED and quit contentHandlerServer.finish(invocation, Invocation.CANCELLED); • Share UI considers that sharing has ended, but does not create a Fastlane item because the sharing was not completed contentHandlerServer.finish(invocation, Invocation. INITIATED);
  • 14. OAUTH 2.0 SUPPORT • • • • • Allows to access server resources on behalf of the resource owner Secure open authorization protocol Authentication handled by Nokia browser Invocation happens through Content Handler Browser - Performs Oauth 2.0 based authentication - Get back the access token - MIDlet app to use that access token further
  • 15. OAUTH 2.0 IMPLEMENTATION 22 November 2013 / Slide no 15
  • 16. EMOJI SUPPORT • • • • • Japanese term which represents a picture It expresses an visual/idea in messaging Standard Unicode set: - Large number of emoji chars - Range: U+1F300 to 1F64F Surrogate pair: - Maps an emoji character to a pictograph - Nokia Asha Platform has built-in implementation Back to UTF16 char: - While reading the char from Java text component
  • 17. EMOJI SUPPORT - IMPLEMENTATION • Constants • Create surrogate par from Unicode character • Get Unicode character back from surrogate pair
  • 18. MORE INFORMATION Overview - http://developer.nokia.com/Develop/asha/java/start/ Downloads - http://developer.nokia.com/Develop/asha/java/tools.xhtml - http://projects.developer.nokia.com/LWUIT_for_Series_40 Guides - Nokia Asha Design Guide: http://developer.nokia.com/Resources/Library/Asha_UI/ - Porting Guide: http://developer.nokia.com/Resources/Library/Porting_to_Nokia_Asha/ - Documentation: http://developer.nokia.com/Develop/asha/java/resources/docs/ - Training Videos: http://developer.nokia.com/Develop/asha/learning.xhtml - Code Examples: http://developer.nokia.com/Develop/asha/java/resources/code/
  • 19. THANK YOU. QUESTIONS? For more information: https://developer.nokia.com/Develop/asha/learning.xhtml