{"id":610,"date":"2018-04-29T12:56:10","date_gmt":"2018-04-29T11:56:10","guid":{"rendered":"http:\/\/generic.wordpress.soton.ac.uk\/soparty\/?p=610"},"modified":"2018-05-04T14:39:37","modified_gmt":"2018-05-04T13:39:37","slug":"610-2","status":"publish","type":"post","link":"https:\/\/generic.wordpress.soton.ac.uk\/soparty\/610-2\/","title":{"rendered":"Data storage"},"content":{"rendered":"<p><strong>Data storage<\/strong><\/p>\n<p>Our approach to data storage differs according to the operating system used with our SoSporty application.<\/p>\n<p><strong>Android<\/strong> provides several options to save application data. <strong>Android<\/strong> provides 2 storage options for files \u2013 Internal and External. Internal is private to the app. External is world readable and accessible to all. External can be a partition of the internal memory or a removable storage media (like an SD card) or both.\u00a0the different data storage options available on Android are:<\/p>\n<ul>\n<li><strong>internal file storage<\/strong>: Store app-private files on the device file system.<\/li>\n<li><strong>External file storage:<\/strong> Store files on the shared external file system. This is for shared user files, such as photos and videos.<\/li>\n<li><strong>Shared preferences: <\/strong>Store private primitive data in key-value pairs.<\/li>\n<li><strong>Databases<\/strong>: Store structured data in a private database.<\/li>\n<\/ul>\n<p><strong>iOS Data Storage <\/strong>Everything in app\u2019s home directory is backed up, with the exception of the application bundle itself, the caches directory, and temp directory. Anything is Purchased is backed up as well. Because backups are done wirelessly and stored in iCloud for each user, it\u2019s best to minimize the amount of data that\u2019s stored in our app. Large files will lengthen the time it takes to perform a backup and consume more of a user\u2019s available iCloud storage. To ensure efficient as possible, app\u2019s data will be stored according to these options:<\/p>\n<ol>\n<li>Only documents and other data that is user-generated, or that cannot otherwise be recreated by the application, should be stored in the Documents directory and will be automatically backed up by iCloud.<\/li>\n<li>Data that can be downloaded again or regenerated should be stored in the Caches directory. Examples of that include database cache files and downloadable content, such as map applications.<\/li>\n<li>Data that is used only temporarily should be stored in the temporary directory. Although these files are not backed up to iCloud they should be deleted when done with them so that they do not continue to consume space on the user\u2019s\u00a0device.<\/li>\n<li>Use the attribute &#8220;do not back up&#8221; for specifying files that should remain on the device. Usable with data that can be recreated but needs to persist even in low storage situations for a proper functioning of the app or because users expect it to be available during offline use. these files do use on-device storage space, your app is responsible for monitoring and purging these files periodically.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>References<\/p>\n<p><a href=\"https:\/\/developer.android.com\/guide\/topics\/data\/data-storage\">https:\/\/developer.android.com\/guide\/topics\/data\/data-storage<\/a><\/p>\n<p><a href=\"http:\/\/codetheory.in\/android-saving-files-on-internal-and-external-storage\/\">http:\/\/codetheory.in\/android-saving-files-on-internal-and-external-storage\/<\/a><\/p>\n<p><a href=\"https:\/\/developer.apple.com\/icloud\/documentation\/data-storage\/index.html\">https:\/\/developer.apple.com\/icloud\/documentation\/data-storage\/index.html<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Data storage Our approach to data storage differs according to the operating system used with our SoSporty application. Android provides several options to save application data. Android provides 2 storage options for files \u2013 Internal and External. Internal is private<\/p>\n","protected":false},"author":2947,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[19,56,72],"tags":[],"class_list":["post-610","post","type-post","status-publish","format-standard","hentry","category-work","category-technical","category-technical-research"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9It56-9Q","_links":{"self":[{"href":"https:\/\/generic.wordpress.soton.ac.uk\/soparty\/wp-json\/wp\/v2\/posts\/610","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/generic.wordpress.soton.ac.uk\/soparty\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/generic.wordpress.soton.ac.uk\/soparty\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/generic.wordpress.soton.ac.uk\/soparty\/wp-json\/wp\/v2\/users\/2947"}],"replies":[{"embeddable":true,"href":"https:\/\/generic.wordpress.soton.ac.uk\/soparty\/wp-json\/wp\/v2\/comments?post=610"}],"version-history":[{"count":3,"href":"https:\/\/generic.wordpress.soton.ac.uk\/soparty\/wp-json\/wp\/v2\/posts\/610\/revisions"}],"predecessor-version":[{"id":613,"href":"https:\/\/generic.wordpress.soton.ac.uk\/soparty\/wp-json\/wp\/v2\/posts\/610\/revisions\/613"}],"wp:attachment":[{"href":"https:\/\/generic.wordpress.soton.ac.uk\/soparty\/wp-json\/wp\/v2\/media?parent=610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/generic.wordpress.soton.ac.uk\/soparty\/wp-json\/wp\/v2\/categories?post=610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/generic.wordpress.soton.ac.uk\/soparty\/wp-json\/wp\/v2\/tags?post=610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}