CS371m - Mobile Computing. Persistence - Web Based Storage CHECK OUT g/sync-adapters/index.

Similar documents
Syllabus- Java + Android. Java Fundamentals

From time to time Google changes the way it does things, and old tutorials may not apply to some new procedures.

d. Delete data e. Transactions Realtime Features a. Value Listener b. Child Listener c. Remove Listeners

Java Training Center - Android Application Development

ITP 342 Mobile App Development. APIs

ITP 342 Mobile App Development. APIs

Android Application Development using Kotlin

ITP 140 Mobile Technologies. Mobile Topics

Firebase Essentials. Android Edition

Login with Amazon. Getting Started Guide for Android apps

CS371m - Mobile Computing. Maps

BaasBox. Open Source Backend as a Service. Otto Hylli

Mobile Programming Lecture 1. Getting Started

Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1

NoSQL & Firebase. SWE 432, Fall Web Application Development

Future Web App Technologies

CONVERTIGO SDK THE ULTIMATE CLIENT MOBILE API FOR CONVERTIGO MBAAS

Firebase Realtime Database. Landon Cox April 6, 2017

Web Service Integration

Build Mobile Cloud Apps Effectively Using Oracle Mobile Cloud Services (MCS)

13/03/2017. Author Bartosz Zurawski (C ) Project Coordinator Joseph K. Research

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

ANDROID DEVELOPMENT. Course Details

JavaScript Fundamentals_

XML Tutorial. NOTE: This course is for basic concepts of XML in line with our existing Android Studio project.

CS371m - Mobile Computing. Responsiveness

ANDROID SYLLABUS. Advanced Android

1. Implementation of Inheritance with objects, methods. 2. Implementing Interface in a simple java class. 3. To create java class with polymorphism

Android Online Training

Back-end architecture

Android Validating Xml Against Schema Java Example

Semester Project Report Mobile Application for Online Surakarta Battle

Index A, B. Cloud functions AndroidManifest.xml, authentication triggers,

PHP. MIT 6.470, IAP 2010 Yafim Landa

CS 403X Mobile and Ubiquitous Computing Lecture 5: Web Services, Broadcast Receivers, Tracking Location, SQLite Databases Emmanuel Agu

Minds-on: Android. Session 1

Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings.

Kyle Rainville Littleton Coin Company

Connect and Transform Your Digital Business with IBM

Eventually, you'll be returned to the AVD Manager. From there, you'll see your new device.

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

BLACKBERRY SPARK COMMUNICATIONS PLATFORM. Getting Started Workbook

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

XAMARIN MOBILE APP. User Guide NOP4YOU.COM 1

Windows Azure Mobile Services

AWS Lambda. 1.1 What is AWS Lambda?

Volume 6, Issue 4, April 2018 International Journal of Advance Research in Computer Science and Management Studies I. INTRODUCTION

Homework 9: Stock Search Android App with Facebook Post A Mobile Phone Exercise

Android Developer Nanodegree Syllabus

NODE.JS MOCK TEST NODE.JS MOCK TEST I

Best Practices Implementing Oracle Mobile Cloud Service

Upgrading Your Development Skills to SharePoint 2013

Android Syllabus. Android. Android Overview and History How it all get started. Why Android is different.

How to customise and what you need to change

Basic Android Setup for Machine Vision Fall 2015

Required Core Java for Android application development

ANDROID APPS (NOW WITH JELLY BEANS!) Jordan Jozwiak November 11, 2012

Module Title : Course 55014A : Upgrading Your Development Skills to SharePoint 2013 Duration : 5 days

Cheetah Orion Ad Platform SDK Guide (for Android) V1.0

Android Development Crash Course

Assignment 1: Port & Starboard

Assignment #3 CSCI 201 Spring % of course grade Title Weathermeister Back-End API Integration

Configuring Push Notifications For Xamarin Forms

Android App Development. Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore

ANDROID SDK EXAMPLE DOCUMENTATION

Chapter 2 Setting Up for Development

Advance Mobile& Web Application development using Angular and Native Script

Hello everyone. My name is Kundan Singh and today I will describe a project we did at Avaya Labs.

Android App Development

Use the API or contact customer service to provide us with the following: General ios Android App Name (friendly one-word name)

AppsFlyer SDK Integration - Android V 4.5.0

CS371m - Mobile Computing. App Project Overview

CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu

AndroidNotification Documentation

React. HTML code is made up of tags. In the example below, <head> is an opening tag and </head> is the matching closing tag.

Build Meeting Room Management Website Using BaaS Framework : Usergrid

Hello World. Lesson 1. Create your first Android. Android Developer Fundamentals. Android Developer Fundamentals

Table of Contents. Copyright Pivotal Software Inc, of

Android Enterprise OEMConfig Setup. Guide to help OEM developers create OEMConfig applications to enforce proprietary and privileged APIs.

AWS Lambda: Event-driven Code in the Cloud

This tutorial is intended to make you comfortable in getting started with the Firebase backend platform and its various functions.

Lab 6: Google Maps Android API v2 Android Studio 10/14/2016

Exam Questions AWS-Certified- Developer-Associate

WebSphere Puts Business In Motion. Put People In Motion With Mobile Apps

Kony MobileFabric. Release Notes. On-Premises. Release 6.5. Document Relevance and Accuracy

CS371m - Mobile Computing. Persistence

Backend Development. SWE 432, Fall Web Application Development

Software Development. Integrated Software Environment

Android About.me/DavidCorrado Mobile Meetup Organizer

MARS AREA SCHOOL DISTRICT Curriculum TECHNOLOGY EDUCATION

SharePoint 2013 Central Administration

Digital it Signatures. Message Authentication Codes. Message Hash. Security. COMP755 Advanced OS 1

Android Essentials with Java

Client Samples. Android Sample

Web Architecture and Development

Google Maps library requires v2.50 or above.

Lab 1 - Setting up the User s Profile UI

Android App Development

CS378 - Mobile Computing. Anatomy of an Android App and the App Lifecycle

Android development. Outline. Android Studio. Setting up Android Studio. 1. Set up Android Studio. Tiberiu Vilcu. 2.

Transcription:

CS371m - Mobile Computing Persistence - Web Based Storage CHECK OUT https://developer.android.com/trainin g/sync-adapters/index.html

The Cloud. 2

Backend No clear definition of backend front end - user interface backend - data, server, programs the user does not interact with directly With 1,000,000s of mobile and web apps rise of Backend as a Service (Baas) Sometimes MBaaS, M for mobile 3

Back End As a Service - May Provide: cloud storage of data integration with social networks push notifications server initiates communication, not the client messaging and chat functions user management user analysis tools abstractions for dealing with the backend4

Clicker How many Mobile Backend as a Service providers exist? A. 1 or 2 B. about 5 C. about 10 D. about 20 E. 30 or more https://github.com/relatedcode/parsealternatives 5

MBaaS 6

Some Examples of MBaas Parse Firebase (Google) Amazon Web Services Google Cloud Platform Heroku PythonAnywhere Rackspace Cloud BaasBox (Open Source) Usergrid (Open Source) 7

8

Examples of Using a MBaaS Parse www.parse.com various pricing models relatively easy to set up and use Going away 1/28/2017 9

Parse Set Up in AndroidStudio 1. request api key 2. Download Parse SDK 3. Unzip files 4. Create libs directory in app directory (select Project view) 5. Drag jar files to libs directory 10

Parse Set Up in AndroidStudio 6. add dependencies to gradle build file under app like so: https://www.parse.com/apps/quickstart# parse_data/mobile/android/native/new 11

Testing Parse Add permissions to manifest to access network state and use internet initialize Parse in oncreate method keys for account and app 12

Testing Parse at the end of oncreate() create and send a test object to Parse abstraction handles doing this in the background, off the UI thread 13

Result of Test JSON JavaScript Object Notation 14

ParseObject Local representation of data (on the device) that can be saved and retrieved from the Parse String in constructor is class name like a table in a data base put to add key - value pairs String - Object keys must be alphanumerics like a column in the row 15

ParseObject saveinbackground method saves object to Parse in a background thread multiple options for saving saveall(list) saveeventually() - if server or network not available saveinbackground(savecallback) 16

Parse and RandomArt add ability to save equations save to parse database allow multiple users to save equations functionality to display a random equation others liked up and down votes 17

onclick for Keep This 18

onclick for Save Equation - cont. ParseObject allowed addition of any key value pair. Keys must be Strings. 19

saveequation Makes a query to get the number of rows in the expression table uses another table with one row with one column (GACK, no auto increment function) callback method for completed query checks the count creates new ParseObject makes the index for this new expression the count (0 based indexing) saves the object and updates count object 20

Parse Dashboard Examine data uploaded from apps 21

demo Saving an Equation 22

Get Random Saved Art When user presses button pick a random saved expression and render that image We just save the expression so we must recreate image time vs. space trade off check count of values and pick random index 23

getrandomgoodart 24

callback object pull out the String from the returned object and build expression based on equation 25

good one logcat 26

More Parse Includes capability to do local data store save objects on device, save to cloud later abstracts away a lot of the details Kyle Norton from Pariveda: "Assume you WON'T be connected to the network." Parse objects meant to be "small" less than 128 kb not for images Parse files for large pieces of data Past semesters many groups used Parse successfully 27

FIREBASE 28

Firebase Yet another Backend as a Service (Baas) Designed for web and mobile Founded in 2011 Initial product was backend so websites could easily host chat as part of site discovered developers were sending non chat data (such as game state) via the tool 29

Firebase for Android Devices with Android 4.0 (ice cream sandwich) or higher Google play services SDK same as fused location Android Studio 1.5 or higher Your Android studio project and package name Firebase Assistant in Android Studio 2.2 or higher Tools -> Firebase 30

Firebase Project Set up Create Firebase project in console Just needs name and country 31

Firebase Project Console After creating project, overview page: 32

Firebase for Android Project Adding Firebase to Android app Need package name (easy) Debug signing certificate SHA-1 hash (for use of some Firebase features) Uses the keytool program included with Java "Manages a keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates. " 33

Adding Firebase to Android App 34

Using keytool Varies from system to system need location of debug signing certificate created automatically when Android Studio installed typically, <USER>/.android/debugkeystore 35

Debug Signing Certificate certificate not human readable 36

Running keytool Specifics vary from system to system 37

Firebase Config File for App After providing package name and SHA-1 fingerprint... Firebase generates a JSON file named google-services.json specific for this project multiple projects / apps -> repeat steps Download and add file to project 38

Firebase Config File for App 39

google-services.json 40

Update Gradle Files 41

Firebase Capabilities Firebase has a host of capabilities User authorization database storage storage for larger files cloud messaging push notifications analytics hosting of web content 42

Firebase Database With Parse offline, migrated Random Art database to Firebase The roots of the chat room are somewhat apparent lots of chat examples realtime updates emphasis on authorized users 43

One More Setup Step To use Firebase databases in app, after previous setup steps: 44

Firebase Database Rules Firebase database rules Defines: How data should be structured How data should be indexed When data can be read or written Who can read and write data 45

Firebase Database Rules 46

Hello Firebase In app, called from oncreate of Activity 47

Result When App Run Immediately writes to database if network connections exists: 48

Firebase database Not traditional tables "Everything is a JSON! tree" Children of main tree are like "tables" in traditional database Children of children are typically (but not always) like rows in a traditional table 49

Random Art Data on Firebase equation count child to assign ids and pick random equation equation list with children for each equation 50

Random Art App keeps track of current equation count First value from database and listener so whenever count changes, local copy is updated 51

Random Art Keep references to parts of JSON tree Update values (equation count) add children (new, good equations) pull random children (old, good equations) In main Random Art Activity 52

Random Art - Count Listener 53

Random Art - Save Equation setvalue method to add child Firebase data: String, Long, Double, Boolean, Map<String, Object>, List<Object> any custom object with 0 argument constructor and public getters for properties 54

Random Art - Get Equation Pick random child based on current number of equations 55

JSON 56

JSON JavaScript Object Notation a way to represent JavaScript objects as Strings alternative to XML for passing data between servers and clients designed for data interchange format that humans can also read and write 57

JSON Format Built on two structures collection of name-value pairs: a.k.a. objects, records, structs, etc. an ordered list of values: a.k.a. an array objects 58

JSON Format arrays values string, number, object, array, true, false, null 59

JSON Values Syntax Diagrams for string and number: http://www.json.org/ 60

JSON Strings 61

JSON Numbers 62

value (String): "Round Rock" array: JSON Examples ["Round Rock", "Dallas", "Houston"] object {"height":70,"weight":165} 63