Android Storage MAY 2013 Hu.Cai. NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] Outline 1.Storage In General 2.SharedPreferences.

Slides:



Advertisements
Similar presentations
Remedy Statistics April 2009 May 28th 2009 Paris Desktop Support Analysis only done with Remedy tickets (Incident-Task-Request) (GRS requests are not included.
Advertisements

Sovereign Credit Quality after the Crisis MARCH, 2010 Steve Hess, VP – Senior Credit Officer.
Chinas Economy in the Post-Crisis World Carnegie Endowment, Washington, D.C. Tom Byrne, Senior Vice President, Asia-Middle East Regional Credit Officer,
Credit Impacts of De-Risking Pension Plans January 29, 2014 Wesley Smyth, Vice President – Senior Accounting Analyst.
© 2013 Sri U-Thong Limited. All rights reserved. This presentation has been prepared by Sri U-Thong Limited and its holding company (collectively, “Sri.
Pension Fund Trustees Liability Ncedi Mbongwe. Introduction to Camargue Underwriting Managers Established in 2001 Underwriters: Mutual and Federal and.
Topics Changes Risk Assessments Cloud Data Security / Data Protection Licenses, Copies, Instances Limits of Liability and Indemnification Requests for.
Permission to reprint or distribute any content from this presentation requires the prior written approval of Standard & Poor’s. Copyright © 2013 by Standard.
Irish recovery? Pär Magnusson
The following slides are approved for external use but may not be altered in any way. For additional information, contact Tom Agoston at Tom Agoston/Somers/IBM.
Housing Climbs Back CELIA CHEN, SENIOR DIRECTOR NOVEMBER 13, 2013.
Finance Directors will Play an Important Role in Securing Grants for Research October 1, 2012 EDITH BEHR, VICE PRESIDENT-SENIOR CREDIT OFFICER.
The Economy’s Chicken-and-Egg Dilemma RYAN SWEET, SENIOR ECONOMIST Connecticut Business & Industry Association, September 7, 2012.
Innovations in Structured Products October 25, 2010 An Innovator’s Dilemma?
Прогноз развития банковского сектора России НОЯБРЬ 2010 ЕВГЕНИЙ ТАРЗИМАНОВ, ВИЦЕ-ПРЕЗИДЕНТ.
THE BUSINESS RESEARCH COMPANY HEALTHCARE CASE STUDIES.
This Time is Different MARK ZANDI, CHIEF ECONOMIST FROM MOODY’S ECONOMY.COM.
Education’s Value Proposition MARK ZANDI, CHIEF ECONOMIST FROM MOODY’S ECONOMY.COM.
Data Persistence in Android
Andrea E. Keenan Vice President – Research & Ratings Criteria Session VI: User Perspectives September 27, 2013 A.M. Best - Oldwick, NJ OECD – ASSAL Regional.
1 Potential Rating Implications of Solvency II London 15 March, 2012 Catherine ThomasDirector, Analytics.
The Demand and Supply of High Quality Liquid Collateral Post Financial Crisis Discussion at PBOC/Tsinghua Global Finance Forum The views expressed in this.
Managing HFAs’ Financial Health in the Face of Uncertainty NCSHA Annual Conference October 21, 2014 Ping Hsieh, Vice President – Senior Analyst.
Renewing Campuses for Long-Term Strength SEPTEMBER 30, 2012 EVA BOGATY, ASSISTANT VICE PRESIDENT-ANALYST.
FPGA and ASIC Technology Comparison - 1 © 2009 Xilinx, Inc. All Rights Reserved How do I Get Started with PlanAhead?
Permission to reprint or distribute any content from this presentation requires the prior written approval of Standard & Poor’s. Copyright © 2010 Standard.
American Public Power Association 2009 Business and Financial Conference The Financial Outlook for Public Power September 15, 2009 Dan Aschenbach, Senior.
CS378 - Mobile Computing Persistence. Saving State We have already seen saving app state into a Bundle on orientation changes or when an app is killed.
Blue Diamond Scott Auge Amduus Information Works, Inc.
Brazilian Banks’ Roadmap Medium-Term Perspectives New York, March 08, 2010M. Celina Vansetti-Hutchins, SENIOR VICE PRESIDENT.
MESSAGING IN THE MEDIA TOP 10 DRUGS BASED ON CREDIBILITY INDEX IN THE LITERATURE JOHN KNAPP, DIRECTOR OF ANALYTICS MAY 2009 Your use of these materials.
Housing Takes Off MARK ZANDI, CHIEF ECONOMIST. Homebuilding Will Ramp Up Sources: Census, Moody’s Analytics Single-family and multifamily starts, mil.
Permission to reprint or distribute any content from this presentation requires the prior written approval of Standard & Poor’s. Copyright © 2014 by Standard.
Single-Family Financing Essentials Part 1: Financing Options NCSHA HFA Institute January, 2015 Ferdinand S. Perrault, Vice President – Senior Analyst.
Android Storage. There are several options for storage of data with Android We can put data into a preferences file. We can put data into a ‘normal’ file.
Nilesh Singh Local Data Storage option Android provides several options for you to save persistent application data. - Shared preferences - Creation.
LiveDist: Real-Time Distribution of Databases, with High-Volume of Updates Dynamic and selective distribution of a central or distributed database, to.
International Telecommunication Union New Delhi, India, December 2011 ITU Workshop on Standards and Intellectual Property Rights (IPR) Issues Philip.
Permission to reprint or distribute any content from this presentation requires the prior written approval of Standard & Poor’s. Copyright © 2012 by Standard.
Risk Culture: Measuring the Qualitative
Permission to reprint or distribute any content from this presentation requires the prior written approval of Standard & Poor’s. Copyright © 2011 Standard.
Oracle Fusion Applications 11gR1 ( ) Functional Overview (L2) Manage Inbound Logistics (L3) Manage and Disposition Inventory Returns.
Global R&D expenditure, development times, global pharmaceutical sales and new molecular entity output MARCH 2008 SOURCE: CMR INTERNATIONAL.
© 2014 Gartner, Inc. and/or its affiliates. All rights reserved. Gartner is a registered trademark of Gartner, Inc. or its affiliates. This publication.
SQlite. SQLite is a opensource SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation.
NCSHA HFA Institute Single Family Financing Essentials, MBS, and TBA January 14, 2016 Florence Zeman, Associate Managing Director.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Europe’s Sovereign Debt Crisis STEVE COCHRANE, MANAGING DIRECTOR OCTOBER 18, 2011.
Allocation of R&D expenditure in 2005 between chemical entity and biological or biotech active substances APRIL 2007 SOURCE: CMR INTERNATIONAL PERFORMANCE.
CHAPTER 9 File Storage Shared Preferences SQLite.
Permission to reprint or distribute any content from this presentation requires the prior written approval of S&P Global Ratings. Copyright © 2016 by Standard.
By: Eliav Menachi.  On Android, all application data (including files) are private to that application  Android provides a standard way for an application.
Permission to reprint or distribute any content from this presentation requires the prior written approval of Standard & Poor’s. Copyright © 2011 Standard.
The secure site rendering issue (all navigation crushed together as a list at the top of the page) is a compatibility issue with Internet Explorer only.
Data Storage in Android Димитър Н. Димитров. Why talk about data? Why not 3D graphics or network connectivity? Data as fundamental term in computer science.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Oracle Proprietary and Confidential. 1.
Rating Methodology Update & Implications for Mutual Insurers Mid-Atlantic Mutual Advantage Convention Hot Springs, Virginia 8 August 2016 Stefan Holzberger.
Squeezing More Resources Out of Your Bond Program September 27, 2016 Florence Zeman, Moody’s Investors Service NCSHA Annual Conference 2016.
Copyright ©2006 CA. All rights reserved. All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Mountain Plains Housing Summit 2016
Mobile Application Development BSCS-7 Lecture # 18, 19
Selecting the right provider
KROLL BOND RATING AGENCY, INC.
Messaging in the Media TOP 10 AUDIENCES BY THERAPY AREA
Self-Registration walk-through
The Demand and Supply of High Quality Liquid Collateral Post Financial Crisis Discussion at PBOC/Tsinghua Global Finance Forum by Jian Hu, Managing Director,
A.M. Best Methodology Update
Kicking Into a Higher Gear
SQLLite and Android.
© 2013 Sri U-Thong Limited. All rights reserved
Presentation transcript:

Android Storage MAY 2013 Hu.Cai

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] Outline 1.Storage In General 2.SharedPreferences 3.File 4.Database 5.External Storage(SDCard and Network) 2

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] 1. Storage In General 3 APP StorageInternalSharedPreferencesFileDatabaseExternalSDCardNetwork

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] 2. SharedPreferences 4  Store private primitive data in key-value pairs, data type include: boolean,int,float,long,string  This data will persist across user sessions, even if your application is killed

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] SharedPreferences Sample 5 Activity- A, write data Activity- B, read data

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] SharedPreferences Sample 6 /data /data/package_name/shared_prefs/config.xml conclusion : light-weight option

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] 3. File 7  Store private data on the device memory.  When the user uninstalls your app, these files are removed.

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] Internal Storage Sample - File 8 Activity- A, write data Activity- B, read data

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] Internal Storage Sample - File 9 /data /data/package_name/files/test.txt conclusion : middle-weight option, depends on the space of your mobile internal storage.

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] 4. Database 10  Store structured data in a private database.  Any databases you create will be accessible by name to any class in the application, but not outside the application.

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] SQLite 11 SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] SQLite 12 Implements most of the SQL-92 standard for SQL but it lacks some features. 1.Partial support for triggers. 2.Can't write to views(delete,insert,update). 3.Can’t support full outer join, right outer join 4.Support limit to return records. 5.Case-sensitive

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] SQLite  Create or Open database SQLiteDatabase openOrCreateDatabase (String name,int mode, SQLiteDatabase.CursorFactory factory) MODE_PRIVATE,MODE_WORLD_ READABLE,MODE_WORLD_WRITEABLE  Execute non-query SQL execSQL(String sql), support insert,update,delete,create,drop SQL.  Execute query SQL rawQuery(String sql), support select SQL.  Cursor to keep track of location within a resultset 13

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] SQLite CRUD - SQLiteDatabase methods  public long insert (String table, String nullColumnHack, ContentValuesinitialValues).  delete(String table, String whereClause, String[] whereArgs)  query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit)  update(String table, ContentValues values, String whereClause, String[] whereArgs) 14

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] SQLite Sample 15

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] SQLite Sample 16

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] 5. External Storage(SDCard and Network) 17  Store public data on the shared external storage.  This can be a removable storage media (such as an SD card) or an internal (non-removable) storage.

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] SDCard Storage Sample 18 Activity- A, write data Activity- B, read data

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] SDCard Storage Sample 19 /mnt/sdcard/sd.txt conclusion : you can write larger data to file. Such as a game application.

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] Network Storage 20  Store data on the web with your own network server.  Web service, HTTP  java.net.* , Android.net.*

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] Which is the best way to store it ? 21 1.How often will the data be accessed or updated? 2.The data is private? 3.Will the data be added to over time? 4.How will the data need to be used? 5.How much space your data requires?

NAME OF PRESENTATION [CHANGE IN SLIDE MASTER] MONTH, YEAR [CHANGE IN SLIDE MASTER] 22 © 2009 Moody’s Analytics, Inc. and/or its licensors and affiliates (collectively, “MOODY’S”). All rights reserved. ALL INFORMATION CONTAINED HEREIN IS PROTECTED BY COPYRIGHT LAW AND NONE OF SUCH INFORMATION MAY BE COPIED OR OTHERWISE REPRODUCED, REPACKAGED, FURTHER TRANSMITTED, TRANSFERRED, DISSEMINATED, REDISTRIBUTED OR RESOLD, OR STORED FOR SUBSEQUENT USE FOR ANY SUCH PURPOSE, IN WHOLE OR IN PART, IN ANY FORM OR MANNER OR BY ANY MEANS WHATSOEVER, BY ANY PERSON WITHOUT MOODY’S PRIOR WRITTEN CONSENT. All information contained herein is obtained by MOODY’S from sources believed by it to be accurate and reliable. Because of the possibility of human or mechanical error as well as other factors, however, all information contained herein is provided “AS IS” without warranty of any kind. Under no circumstances shall MOODY’S have any liability to any person or entity for (a) any loss or damage in whole or in part caused by, resulting from, or relating to, any error (negligent or otherwise) or other circumstance or contingency within or outside the control of MOODY’S or any of its directors, officers, employees or agents in connection with the procurement, collection, compilation, analysis, interpretation, communication, publication or delivery of any such information, or (b) any direct, indirect, special, consequential, compensatory or incidental damages whatsoever (including without limitation, lost profits), even if MOODY’S is advised in advance of the possibility of such damages, resulting from the use of or inability to use, any such information. The ratings, financial reporting analysis, projections, and other observations, if any, constituting part of the information contained herein are, and must be construed solely as, statements of opinion and not statements of fact or recommendations to purchase, sell or hold any securities. NO WARRANTY, EXPRESS OR IMPLIED, AS TO THE ACCURACY, TIMELINESS, COMPLETENESS, MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OF ANY SUCH RATING OR OTHER OPINION OR INFORMATION IS GIVEN OR MADE BY MOODY’S IN ANY FORM OR MANNER WHATSOEVER. Each rating or other opinion must be weighed solely as one factor in any investment decision made by or on behalf of any user of the information contained herein, and each such user must accordingly make its own study and evaluation of each security and of each issuer and guarantor of, and each provider of credit support for, each security that it may consider purchasing, holding, or selling.