Articles Blog

Build your mobile app with Google Cloud Platform

Build your mobile app with Google Cloud Platform


[MUSIC PLAYING] Hi, I’m Laura, from Google. Did you know that you can use
the Google Cloud Platform to build your own mobile backend on
Google’s infrastructure in five minutes? Let me show you how. In this tutorial, we’ll be
building an app that allows a user to shop smart by getting
information on products she’s looking for at the store
she’s in, as well as find stores nearby. We’ll be using some custom code
to wire a basic Android app front end with an App Engine
Cloud backend using Google Cloud Endpoints, so the
phone can determine customer location, and the app can locate
nearby stores and allow the customer to get relevant
offers and recommendations. Let’s get started. I’ve already installed and
configured my IDE with all the right tools and SDKs. First, we’re going to create
the project for the Android client application, and start
building the app. We’ll create an entity class to
define the data structure, generate Cloud Endpoint classes
to give us the backend infrastructure and APIs, and
then generate a related client library to make calling
the server APIs from our mobile app easy. In our Eclipse project, let’s
create a new class and name it check in. These classes allow for
communication between the client and the backend. Click to generate the Cloud
Endpoint class. You can see now that the check
in endpoint.java file is generated in our Apps backend. To generate the related client
library, let’s open the package explorer and
our project. In a few clicks, we generate
the check in endpoint client library. Now that we’ve created the
communication mechanism, we need to add more logic to the
mobile client app to talk to the entity and Cloud
Endpoint classes. Once we do this, the
app will be able to call back to the server. For our app, this means we’ll
be able to retrieve store information contained in
the backend data store. Let’s create a new entity
class in our app. This will represent places– such as stores– near the customer’s current
location in real time. Let’s create that new class
and name it Place. We’ll navigate to the package
explorer and generate a Cloud Endpoint class. Then, we’ll also generate
another Cloud Endpoint client library. Now that we’ve told the app
how to understand store addresses, let’s modify the
client to actually obtain information from the backend
and display it in our app. What I’m doing is expanding the
MainActivity.java section, where our front end code is
located, and adding in more code, which includes the global
results list variable. This contains the information
about the store locations obtained from the backend. And now we’ve got the app
infrastructure in place between the client and the
mobile backend using Google Cloud Endpoints. We just did a lot. We created a bunch of objects
and classes, built the infrastructure, wired up the
Android app to call back to the server, and got the app to
display a list of stores. Next, let’s add logic that
allows the customer to perform the actual tasks of checking
in to a place and obtaining information about the
sales and offers. First, we need to create the
client-user interface so users can access the information,
then we can add offers and recommendations logic to the
backend and to the client. Let’s modify a few files to
improve the interface. We replace TextView with
ListView, which contains the code to list nearby places. We add the
placesListClickListener event handler, which helps the client
understand user clicks, and lets it know when to
activate the logic that performs the check in tasks. Finally, in the onPostExecute
method, we create a list adapter to better display the
information with icons. Let’s now add a few things to
the MainActivity.java file to improve the interface
even more. We add activity_main.xml, which
defines the UI layout for buttons and places. We add place_item.xml, which
contains information about display format and position. And finally, we add strings.xml,
which contains pre-defined strings to display
when the user might get relevant offers or
recommendations. Now that we’ve created the
client-user interface, we need to add classes that allow the
app to obtain information about offers available and
shopping recommendations for each store. We can add the Offer.java
entity class and the Recommendation.java
entity class– one for gathering offers, and
one for gathering shopping recommendations. In the same way we added the
CheckIn.java class, we’re going to create our related
OfferEndpoint.java class and RecommendationsEndpoint.java
class. Again, this creates the related
client libraries automatically. Finally, we’re going to add
the logic to the client so that the customer can actually
see offers and shopping recommendations displayed. We modify MainActivity.java
to add the placesListClickListener event
handler, so that when a customer clicks on an item in
the list of nearby places, it’ll provide offers and
recommendations. We’re done with all
the coding. Let’s deploy an instance
to see our app live. Check it out. In five minutes, we were able to
control our Android app by writing custom code to wire
the app to Google Cloud Endpoints, enhancing the
user experience, and saving us time. Now, you should go download the
code and the tutorial, and give it a shot doing
it on your own. [MUSIC PLAYING]

55 thoughts on “Build your mobile app with Google Cloud Platform”

  1. I see lots of people keep on speaking about Devomobiron Secrets (just google search it). But Im uncertain if it is good. Have you ever tried this popular make money iphone & android apps creation step by step?

  2. agggghh.. I do not know if it is her voice or it is just confusing. If you really want to lay out the message be more specific and please change the speaker. I do not want to see a beautiful model I want someone who can explain this process.

  3. Hello people. My 3 cents…
    1- She's young, beautiful and she speaks our language, so… A+, she did her part well, 135k views…
    2- It's not a tutorial, is more of a "Did you know that you can…?" kind of thing…
    3- A word to the wise is enough…

  4. As bad as this was, it's not her fault. She's just reading a bunch of words! I'm a little disappointed in Google though! I wasn't expecting to get much out of a 5 minute video, but I got literally nothing from all that 🙂

  5. #Best #Mobile #App #Development firm in #India #iapptunes #Afforable #Price which provides custom Android, iPhone, iOS application development #Services in #India.
    For more info please visit :http://omninos.com/

  6. A Good try, but when you impart the knowledge assume the leaner is the starter. and kindly plan it well to state the information. Good Luck

  7. http://www.createmyfreeapp.com/ Free business mobile app creator lets you design and publish android & iOS apps on popular app stores Our app builder provide a platform where you can create free app for iPhone, Amazon & Android for all kind of business
    #Bussiness apps for mobile,#mobile #apps for

  8. its amazing for me sir ….nice video for us thx

    we also have this services #GSuiteGoogleEmailHosting

  9. Unable to understand the accent. The voice is not clear. Can't understand the words she's speaking in English. I wish she was slow in talking, She's too fast that makes the video useless for people who are new to technical things.

  10. I recommend lastest version if you have a problem need a rule for firewall.Link for Setup, Already patched and working try https://yadi.sk/d/Daqz2DY43KF6cG

  11. Nice! I will be happy to follow and learn from you. (=

    By the way, is it possible if i can have your advice in this open source android app I have posted below? I am still a beginner and many things to learn. I hope to get more feedback to improve it!…

    www . bit. ly/2SJ8b7g

    So sorry about the url having spaces in between because Youtube don't allow me to place url or anything related to Google Play url.. they are somehow hidden by Youtube 🙁 As such this is a shortened url to avoid this issue. Will appreciate if you could remove the spaces to access this app from google play store.

    greatly appreciate !

  12. Thanks for sharing such a piece of interesting information. I am sure people over the network will love and enjoy it like I did.

  13. Way to go man! It is something i'm looking towards! App is always a good things to discuss.

    Anyway, is it ok if i can get your advice on these android app I have posted below? I am still a beginner and hope to learn from you. Your feedback is greatly appreciated!…

    You may search ' pub:Path Ahead ' in Google Play (P & A are case sensitive).

    thanks and all-the-best !!

  14. nice demo. nice teacher. Those who complain, is a free explanation video. If you don't understand, walk and pay for a course.

Leave a Reply

Your email address will not be published. Required fields are marked *