Reader small image

You're reading from  Learning IBM Bluemix

Product typeBook
Published inOct 2016
Reading LevelIntermediate
PublisherPackt
ISBN-139781785887741
Edition1st Edition
Languages
Right arrow
Author (1)
Sreelatha Sankaranarayanan
Sreelatha Sankaranarayanan
author image
Sreelatha Sankaranarayanan

Sreelatha Sankaranarayanan has close to 16 years of experience in software engineering. She has been with Phoenix Global Solutions (now Tata Consultancy Services) for close to 2.5 years. She is currently with IBM India and has been with them for the last 13.5 years. During her career, she has been part of product development, support, and test teams, primarily working on enterprise middleware products. In her most recent role, she was responsible for evangelizing IBM's cloud platform as-a-service, Bluemix, and has worked with System Integrators, academia, and IBM partners to enable and support them with the adoption of IBM's cloud platform as-a-service, Bluemix. She has coauthored a redbook entitled B2B Solutions using WebSphere Partner Gateway v6.0, authored some developerWorks articles, and some blog posts on the Mobile Enterprise Application Platform (MEAP), Internet of Things (IoT), and cloud platform as-a-service (Bluemix). You can find her on Twitter at @sreelathas and on LinkedIn at https://in.linkedin.com/in/sreelathas.
Read more about Sreelatha Sankaranarayanan

Right arrow

Chapter 10. Mobile Application Development on Bluemix

In the previous chapter we learnt about the architecture pattern for application development on cloud, called Microservices architecture pattern. We also learnt how to use Bluemix and services on Bluemix to build and deploy applications that employ the microservices architecture.

In this chapter, we will learn to develop a simple mobile client application using Bluemix, and we will also learn the use of Bluemix services with the mobile applications. You will also see how easy it is to get started with your mobile application development using the template applications provided out of the box in the mobile dashboard on Bluemix.

Note

Discussions in this chapter will be based upon the capabilities that are available on Bluemix at the time of writing this book.

In this chapter, we will be covering the following topics:

  • Learn about the mobile category services available on Bluemix

  • Create a mobile application using the mobile dashboard on Bluemix...

Mobile category services


Services under the Mobile category, as seen in the Bluemix catalog, are as follows:

  • Mobile Analytics: This is an IBM service

  • Mobile Application Content Manager: This is an IBM service

  • Mobile Client Access: This is an IBM service

  • Mobile Foundation: This is an IBM service

  • Push Notifications: This is an IBM service

  • Mobile Quality Assurance: This is an IBM service

  • TestdroidCloud: This is a third-party service

  • Twilio: This is a third-party service

  • Kinetise: This is a third-party service

When you log in to Bluemix and select the Mobile category, you will be taken to what is known as the Mobile Dashboard:

From here you can create a new mobile project, or you can add a mobile service instance by clicking the Get started now! icon in the top-right corner, as shown in the following screenshot:

Clicking the Get started now! icon will display the mobile services available on Bluemix. At the time of writing this book, the available mobile services are as shown in the following...

Creating a mobile application


In this section, we will learn how to create a new mobile project on Bluemix and how to modify it to suit your requirements. Later in this section, you will also learn how we can configure the mobile service Push Notifications to send notifications to a mobile device running the application.

Creating a mobile project

Once you have logged into the Bluemix organization and space where you want to create the mobile application, you can follow the steps given here to create the new mobile application:

  1. From the mobile dashboard, Projects, click on New Project to start creating your mobile project:

  2. There will be options for the type of application you want to create; based on the choice made, a template or starter application will be created for you. By default the Empty App template is selected. For our discussion in this chapter, we will be creating a catalog application. Therefore, as shown in the following screenshot, choose Store Catalog and click Create:

  3. Once...

Running the application on an Android emulator


In this section, we will learn how to run the application you just created in an Android emulator using Android Studio.

Note

You can download the latest version of Android Studio for your OS from https://developer.android.com/studio/index.html . For instructions on how to install and work with Android Studio, refer to https://developer.android.com/studio/install.html .

Assuming you have installed Android Studio, follow the instructions given here to work with the application code that you downloaded in the previous section:

  1. Click File | Open from the menu in Android Studio, as shown in the following screenshot:

  2. Browse to the source code folder you downloaded in the previous section. Choose the project folder, which is  B05307 in this demo. Once the studio opens the mobile project, you will see the following resources and structure in your studio window:

  3. To run the application, click the play icon, as shown in the following screenshot:

  4. You will...

Integrating Push Notifications to the application


In the previous section, we learned how to create a mobile application from a template, how to customize it, and how to download it and work with it on your local Android Studio. In this section, we will learn how to extend your mobile application so that it can receive push notifications from the server.

Push Notifications is an asynchronous way of sending messages to application users' devices. To enable this, we will use the Push Notifications service on Bluemix.

Creating the Push Notifications service instance

Let us first create the Push Notifications service instance. Follow the steps given here to create the service instance:

  1. Log in to Bluemix, and select the Mobile category to go to the Mobile dashboard:

  2. From here you can add a mobile service instance by clicking the Get started now! icon in the top-right corner, as shown in the following screenshot:

  3. Clicking the Get started now! icon will display the mobile services available on Bluemix...

Summary


In this chapter, we learned how we can easily develop, customize, and extend a mobile application using the capabilities on Bluemix. We also learned how to use one of the value-added mobile services on Bluemix, Push Notifications, and how to use it with your application. You also learned how to extend your mobile application locally to build features or value into the application after starting from a quick starter or template application, provided on Bluemix.

With this chapter, you have completed the basics of the IBM Bluemix cloud platform. If you have followed the steps to work with Bluemix as discussed in each of the chapters in this book, then you are equipped to begin your journey to explore further and to discover the other powerful and useful services and capabilities of the Bluemix platform. This book is an attempt to introduce you to Bluemix and to enable you to get your hands dirty. You have now scratched the surface, go ahead and dive deep. Discover the power of Bluemix...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Learning IBM Bluemix
Published in: Oct 2016Publisher: PacktISBN-13: 9781785887741
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Sreelatha Sankaranarayanan

Sreelatha Sankaranarayanan has close to 16 years of experience in software engineering. She has been with Phoenix Global Solutions (now Tata Consultancy Services) for close to 2.5 years. She is currently with IBM India and has been with them for the last 13.5 years. During her career, she has been part of product development, support, and test teams, primarily working on enterprise middleware products. In her most recent role, she was responsible for evangelizing IBM's cloud platform as-a-service, Bluemix, and has worked with System Integrators, academia, and IBM partners to enable and support them with the adoption of IBM's cloud platform as-a-service, Bluemix. She has coauthored a redbook entitled B2B Solutions using WebSphere Partner Gateway v6.0, authored some developerWorks articles, and some blog posts on the Mobile Enterprise Application Platform (MEAP), Internet of Things (IoT), and cloud platform as-a-service (Bluemix). You can find her on Twitter at @sreelathas and on LinkedIn at https://in.linkedin.com/in/sreelathas.
Read more about Sreelatha Sankaranarayanan