Blog of our latest news, updates, and stories for developers
Cloud Enabling your Mobile App
Thursday, June 26, 2014
By
Jason Polites,
Cloud Platform Team
Many mobile apps today suffer from “app-nesia” — the affliction that causes an app to forget who you are. Have you ever re-installed an app only to discover you have to re-create all your carefully crafted preferences? This is typically because the user’s app data lives only on the device.
By connecting your apps to a backend platform, you can solve this issue, but it can be challenging. Whether it’s building basic plumbing, or just trying to load and save data in a network & battery-efficient way, spending time dealing with the backend can take precious time away from building an awesome app. So, we’re introducing two new features to help make your life easier.
Google Cloud Save
Google Cloud Save allows you to easily load and save user data to the cloud without needing to code up the backend. This is handy for situations where you want to save user state and have that state synchronized to multiple devices, or survive an app reinstall.
We handle all the backend logic as well as the synchronization services on the client. The synchronization services work in the background, providing offline support for the data, and minimizing impact on the battery. All you need to do is tell us when and what to save, and you do this with just 4 simple methods:
.save(client, List<Entity>)
.delete(client, Query)
.query(client, Query)
.requestSync(client)
All data is written locally first, then automatically synchronized in the background. The save, delete and query methods provide your basic CRUD operations while the requestSync method allows you to force a synchronization at any time.
On the backend the data is stored in
Google Cloud Datastore
which means you can access the raw data directly from a
Google App Engine
or
Google Compute Engine
instance using the existing
Datastore API
. Changes on the server will even be automatically synced back to client devices. Importantly, this per-user data belongs to you, the developer, and stored in your own Google Cloud Datastore database.
Google Cloud Save is currently in private beta and will be available for general use soon. If you’re interested in participating in the private beta, you can sign up here!
Cloud Tools for Android Studio
To simplify the process of adding an App Engine backend to your app,
Android Studio
now provides three App Engine backend module templates which you can add to your app:
App Engine Java Servlet Module - Minimal Backend
App Engine Java Endpoints Module - Basic Endpoint scaffolding
App Engine with Google Cloud Messaging - Push notification wireup
When you choose one of these template types your project is updated with a new Gradle module containing your new App Engine backend. All of the required dependencies/permissions will be automatically set up for you.
Built-in rich editing support for Google Cloud Endpoints
Once you have added the backend module to your Android application, you can use
Google Cloud Endpoints
to streamline the communication between your backend and your Android app. Cloud Endpoints automatically generates strongly-typed, mobile optimized client libraries from simple Java server-side API annotations, automates Java object marshalling to and from JSON, and provides built-in OAuth 2.0 support.
On deployment, this annotated Endpoints API definition class generates a RESTful API. You can explore this generated API (and even make calls to it) by navigating to
Endpoints API explorer
as shown in the image below:
To simplify calling this generated API from your Android app, Android Studio will automatically set up your project to include all compile dependencies and permissions required to consume Cloud Endpoints, and will re-generate strongly-typed client libraries if your backend changes. This means that you can start calling the client libraries from your Android app immediately after defining the server-side Endpoints API.
The underlying work-horses: Gradle, and Gradle plug-in for App Engine
Under the hood, Gradle is used to build both your app and your App Engine backend. In fact, when you add an App Engine backend to your Android app, the open-source
App Engine plug-in for Gradle
is automatically downloaded by Android Studio, and common App Engine tasks become available as Gradle targets. This allows you to use the same build system across your IDE, command-line or continuous integration environments.
Checkout more details on the new Cloud Endpoints features in
Android Studio on the Android Developer Blog
.
Posted by
Louis Gray
, Googler
No comments :
Post a Comment
Labels
#AIY
#freeandopen
#GooglePlay #AndroidDevStory #PlayStore #DeveloperConsole #StoreListingExperiments
#growwithgoogle
#io12
#io13
#io14
#io15
#io16
#io17
#io18
#io2012
#io2013
#io2014
+1
20% project
3d
about.com
accelerator
accessibility
actions
actions on google
actionsongoogle
Administrative APIs
AdMob
adobe
Ads
adsense
advogato
AdWords
africa
agpl
AI
AIY
AIY Projects
AIYProjects
ajax
ajax apis
ajax search
ajax search books news apis
all for good
amarok
AMP
AMP Cache
analytics
android
android developer certification
Android Studio
Android Things
android wear
Announcement
announcements
apache
api
API.AI
apis
apis console
apis explorer
apis. charts
app
app engine
app indexing
app indexing api
App Invites
apple
apps
apps script
AR
area 120
artifact management
Artificial Intelligence
asia
assistant
atom publishing protocol
Audio
australia
Auth
authentication
authsub
automatic speech recognition
awards
axsjax
barcodes
beacon
beacons
bespin
best practices
beta
bigquery
Blockly
blogger
book search
books API
bootcamp
british english
Brotli
browser
Build Out
building ajax apps
BuildOut
business
buzz
c++
Cache
caja
caldav
calendar
camino
campfire one
caption
cardboard
CardDAV
cast
Certification
channel
chinese
chrome
chrome apps
chrome dev summit
chrome devtools
chrome experiment
chrome extensions
chrome os
chrome web store
chromecast
chromium
chronoscope
cifs
classes
classroom api
client libraries
closure tools
cloud
cloud datastore
cloud functions for firebase
cloud platform
cloud portability
cloud services
cloud sql
cloud storage
cms
coca cola
CocoaPods
code for educators
code jam
code review
code-in
codeedu
codelabs
coffee with a googler
collada
color
Colt McAnlis
commerce
community
competition
Compilers
compression
compressorhead
computer vision
computing heritage
conferences
contacts api
Containers
contest
contextual gadgets
conversations
Core ML
couchdb
countdown to I/O 2012
courses
CPU
crash course
Crash Reporting
crashlytics
creative commons
cricket
crisis response
cryptography
css
css3
custom search
custom search api
danish linux forum
dart
Data Compression
Data Visualization
database
Dataset
Datasets
datastore
design
devart
develop
developer
Developer Communities
developer expert
Developer Keynote
developers
developers. meetup
devfest
devfest developer chrome maps social wave apps
DFP
dialogflow
discovery service
diversity
django
dns
do-it-yourself
Docker
docs
documentation
documents list api
dojo
doodles
dot net
doubleclick
dreamweaver
Drive
drupal
dynamic links
earn
earth
eclipse
eclipsecon
eddystone
educatio
education
email
EMEA
endpoints
enterprise
entrepreneurs
Estimator
Estimators
Europe
event
events
evolution
execution api
extensions
Fabric
fairness in machine learning
faster web
featured
feeds
finance
Firebase
Firebase Analytics
Firebase Cloud Messaging
Firebase Dynamic Links
firebug
firefox
firestore
firevox
firstbeta
fitness
flutter
font api
Fonts
fosdem
freebsd
freenet
Fridaygram
fusion tables
G Suite
gadgets
Game Developers Conference
games
gaming
gcc
gci
GCP
GDA
gdata
GDC17
GDD
gdd07
gdd08
gdd09
GDD11
GDE
gdg
gdl
gdl weekly
gears
geo
geolocation
geoserver
getpaid
ghop
git
github
GKE
gmail
Gmail APIs
gnome
gnome women's summer outreach program
Go
goo.gl
Google
Google APIs
google apps
google apps api
google apps for your domain
google apps marketplace
Google AR
google assistant
google assistant sdk
Google Brain
google buzz
google cast
google chart api
google checkout
google chrome
Google Cloud
Google Cloud Messaging
Google Cloud Platform
google cloud storage
google code
google code project hosting
google code search
google code university
google compute engine
google data apis
google data protocol
Google Data Studio
google developer day
google developer days
google developers
Google Developers Academy
google developers certification
Google Developers Live
Google Developers site
Google Developers University Consortium
google docs
Google Docs API
google doctype
Google Drive
Google Drive SDK
google earth
google fit
Google Fonts
google friend connect
google gadgets
google gears
google grants
google health
Google I/O
Google Identity Platform
google io
google mashup editor
Google Noto fonts
Google Play
Google Play Developer API
google play services
google scholarships
Google Science Fair
Google sheets
Google Sheets API
Google Slides
Google Slides API
Google Spreadsheets API
google storage
google summer of code
Google tech talk
google technoloy user groups
google tv
google visualization api
google wallet
Google Wave
google web elements
google web toolkit
google.org
google+
GoogleAssistant
googlecast
googleio
googlenew
GooglePlay
googlewebelements googleio
GPE
GPGS C++ Games
GPT
green linux
grow
grow with google
gsoc
GSuite
gtags
gtug
guest post
guice
gulp
GWSOP
gwt
gzip
hackathon
hacking
hackthon
hamilton
hangouts
Hangouts Chat API
haproxy
hg
hibernate
howto
hpux
html
html5
http
I/O
I/O 17
I/O 2017
I/O Extended
I/O Live
ical
identity
ietf
ignite
igoogle
iguanas
iiw
Image Compression
image search
Imara
In-app billing
in-app payments
in-app purchase
incubator
India
indie
intelligentwire
interactive music
internationalization
internet explorer
internet of things
interviews
IO17
io18
IO2017
ios
iOS SDK
IoT
ipad
iphone
israel
Issue Tracker
jaiku
japanese
java
javascript
jetpack
joomla
joomladayus2007
joomladayusa
json
karaoke
KDE
KDE 4.0
Keras
kernel
kernel summit
keynote
khronos
kids
kids coding team
kml
korean
Krakow
Kubernetes
labs
lanchpad
languages
latitude
launch
launchpad
launchpad accelerator
launchpad studio
lca
Leadership
Learning
lens
lessons
licenses
linux
linux foundation
linux summit
linux virtual server
linuxconf eu
localization
LoCo
london
mac
MacFuse
Machine
machine intelligence
machine learning
Makers
malware
maps
maps apis
Marketplace
material
material components
material design
MDL
meetup
mercurial
MIT CSAIL
ml
MLCC
mobile
mobile design
mobile performance
mobile sites
mobile speed
mobile UX
Mobile web
mod_pagespeed
Moderator
monetize
MOOC
mozilla
mylar
myspace
MySQL
mythtv
named
narratives
native ads
native client
nearby
netbsd
non-profit
nonsense
nosql
notifications
Noto Serif CJK
nss
nvidia
O3D
oauth
OAuth playground
OAuth2
objective-c
OCaml
ocr
ODF
office hours
oha
OOXML
open data
open source
open source blog
open source releases
open web
openajax alliance
opengl
openid
opensocial
openssh
openssl
Optimization
oreilly
orkut
oscon
oscon2007
osi
oss devs
ossjam
osx
pactester
page speed
PageSpeed
palette
payments
Peer bonus program
performance
phone
photos
picasa
picasa web
places API
play services
playground
plone
plone sprint
podcast
Poly
polymer
Polymer Summit
portugal
posix
PowerMeter API
prediction api
preview
prizes
programming
Progressive Web App
project hosting
Project Loon
Project Tango
prototype
proximity
pubsubhubbub
PWA
py3k
python
python sprint
rails
random hacks of kindness
Rasberry Pi
reader
releases
Remote Config
research
reserve seats
result snippets
Reto Meier
Rewarded Ads
Rewarded Video Ads
rhino
Saatchi
salesforce
samba
sandbox
Santa Tracker
scalability
scale-ups
schedule
scholarship
scholarships
Scratch
screencast
sdk
sdks
search
security
serif
service worker
sessions
Sheets API
shindig
shopping
Shoreline Amphitheatre
showcase
sidewiki
sign-in
silverstripe
SIMD
sitemaps
sites api
sixapart
sketchup
Slides API
Smart Lock for Passwords
soap search api
soc
social
social graph
solaris
souders
spa2007
spdy
speakers
speech
speed
speed tracer
standards
startup
startups
STEM
storage
Street View
student programs
students
stuff
style
subscribed links
subscription
subversion
summer of code
Sundar Pichai
SVG
sxsw
syndication
tasks API
Team Drives (new)
techmakers
templates
TensorFlow
tensorflow dev summit
TensorFlow Lite
TensorFlow Research Cloud
tensorRT
Test Lab
testing
text embedding models
tfdevsummit
TFLite
themes
tool
tools
topp
training
tranparency
transit
translate
translation
tutorials
tv
ubiquitous computing
ubiquity
ubucon
ubuntu
Udacity
UI
unicode
unit test
Unity
universal
Universal App Campaigns
University
unix
url
url shortener
URLs
video
videos
Vim
virtual keyboard
virtual reality
visualization
voice
voice kit
VR
wattpad
Wearables
Weave
web
web animations api
web apps
web components
web design
web designer
web development
web exponents
web fonts
web performance
web platform docs
webfonts
webgl
webmaster
WebP
website optimizer
webVR
weekly roundup
WhiteHouse.gov
Who's at Google I/O
win
windows
windows programming
Winter of Code
Women Tech Makers
women techmakers
writing
wtm
xauth
yahoo
Young Makers
youtube
zlib
zurich
ZXing
Archive
2018
Apr
Mar
Feb
Jan
2017
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2016
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2015
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
2014
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2013
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2012
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2011
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2010
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2009
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2008
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2007
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2006
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2005
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Subscribe
Google
on
Follow @googledevs
Visit
Google Developers
for docs, event info, and more.
No comments :
Post a Comment