SlideShare ist ein Scribd-Unternehmen logo
1 von 7
Downloaden Sie, um offline zu lesen
WORKING WITH PERSISTENT STORAGE
ON NOKIA SERIES 40



Michael Samarin
Director,
Developer Training and Evangelism
Futurice
PERSISTENT STORAGE
• Keeping data between application sessions
• Caching data from network sessions for improving
  application performance
• Extending application’s data or graphics assets (not
  code), beyond 1 or 2 MB JAR file size limit
AVAILABLE OPTIONS
• FileConnection API
     • Optional JSR-75, but available on all Series 40 devices
• RecordStore (also known as RMS)
     • Part of MIDP specification

• Both APIs operates on file system level, but with different abstraction
  layers
• There are no performance benefits of using one vs. another, they are
  equally fast (or slow) – you should choose, according to your application
  needs
• There are no widely known or used relational databases for Java ME
OPTION FileConnection
• FileConnection API gives you almost full access to file system, including
  disk (memory cards), directories and files
• Methods for accessing streams with Java IO: InputStrem/DataInputStream
  and OutpuStrem/DataOutputStream
• However, it is matter of Java ME security model, resulting in different
  amount of permission dialogs interrupting application flow
• Amount of dialogs depends on signing, however 3rd party signing will not
  completely suppress such dialogs
• Parts of file system are not available for accessing by 3rd party Midlets

http://www.developer.nokia.com/Resources/Library/Java/#!developers-guides/datahandling/file-
access/fileconnection-api.html
OPTION RecordStore (RMS)
• Each Midlet Suite allows to create multiple RecordStores (up to 2000, each with
  maximum size 512KB on Series 40)
• Each RecordStore represents set of Records with unique numerical IDs (non
  repeating, even when you delete existing records)
• Each record is just byte array of arbitrary length, so you read and write byte arrays,
  and it is up to developer to serialize and de-serialize objects if needed
• Don’t fall into common trap of wrapping read/write operations into byte and data
  streams, it really doesn’t matter on Java ME and only adds performance overhead
• Accessing RecordStores doesn’t trigger Java ME security model, so there will never
  be any permission dialogs
• You can permit sharing RecordStore between Midlet Suites
 http://www.developer.nokia.com/Resources/Library/Java/#!developers-
 guides/datahandling/persistent-data.html
HANDS-ON DEMO
THANK YOU!
Want to learn more?
www.developer.nokia.com




             Michael Samarin, Director of Developer Training and Evangelism, Futurice

Weitere ähnliche Inhalte

Mehr von Microsoft 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 phones
Microsoft 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 apps
Microsoft Mobile Developer
 

Mehr von 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
 
Introduction to Nokia Asha SDK 1.2 (beta)
Introduction to Nokia Asha SDK 1.2 (beta)Introduction to Nokia Asha SDK 1.2 (beta)
Introduction to Nokia Asha SDK 1.2 (beta)
 
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 ...
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Persistent storage techniques for Series 40

  • 1. WORKING WITH PERSISTENT STORAGE ON NOKIA SERIES 40 Michael Samarin Director, Developer Training and Evangelism Futurice
  • 2. PERSISTENT STORAGE • Keeping data between application sessions • Caching data from network sessions for improving application performance • Extending application’s data or graphics assets (not code), beyond 1 or 2 MB JAR file size limit
  • 3. AVAILABLE OPTIONS • FileConnection API • Optional JSR-75, but available on all Series 40 devices • RecordStore (also known as RMS) • Part of MIDP specification • Both APIs operates on file system level, but with different abstraction layers • There are no performance benefits of using one vs. another, they are equally fast (or slow) – you should choose, according to your application needs • There are no widely known or used relational databases for Java ME
  • 4. OPTION FileConnection • FileConnection API gives you almost full access to file system, including disk (memory cards), directories and files • Methods for accessing streams with Java IO: InputStrem/DataInputStream and OutpuStrem/DataOutputStream • However, it is matter of Java ME security model, resulting in different amount of permission dialogs interrupting application flow • Amount of dialogs depends on signing, however 3rd party signing will not completely suppress such dialogs • Parts of file system are not available for accessing by 3rd party Midlets http://www.developer.nokia.com/Resources/Library/Java/#!developers-guides/datahandling/file- access/fileconnection-api.html
  • 5. OPTION RecordStore (RMS) • Each Midlet Suite allows to create multiple RecordStores (up to 2000, each with maximum size 512KB on Series 40) • Each RecordStore represents set of Records with unique numerical IDs (non repeating, even when you delete existing records) • Each record is just byte array of arbitrary length, so you read and write byte arrays, and it is up to developer to serialize and de-serialize objects if needed • Don’t fall into common trap of wrapping read/write operations into byte and data streams, it really doesn’t matter on Java ME and only adds performance overhead • Accessing RecordStores doesn’t trigger Java ME security model, so there will never be any permission dialogs • You can permit sharing RecordStore between Midlet Suites http://www.developer.nokia.com/Resources/Library/Java/#!developers- guides/datahandling/persistent-data.html
  • 7. THANK YOU! Want to learn more? www.developer.nokia.com Michael Samarin, Director of Developer Training and Evangelism, Futurice