Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Android Wear Projects
  • Table Of Contents Toc
  • Feedback & Rating feedback
Android Wear Projects

Android Wear Projects

By : Kumar S
close
close
Android Wear Projects

Android Wear Projects

By: Kumar S

Overview of this book

Android Wear Projects is your opportunity to step into the exciting new world of Android Wear app development. This book will help you to master the skills in Android Wear programming and give you a complete insight on wear app development. You will create five different Android Wear apps just like the most popular Android Wear apps. You will create a To-do list, a city maps app, a Wear messenger, Wear fitness tracker and Watch face. While you create these apps you will learn to create custom notifications, receive voice inputs in notifications, add pages to notifications and stack notifications. You will see how to create custom wear app layouts, the custom UIs specially designed for Wear. You will learn to handle and manage data and syncing data with other devices, create interactive Watch faces and also ensure the safety and security of your Wear apps by testing and securing your apps before you deploy them on the app store.
Table of Contents (12 chapters)
close
close
2
Let us Help Capture What is on Your Mind - WearRecyclerView and More
3
Let us Help Capture What is on Your Mind - Saving Data and Customizing the UI
5
Measuring Your Wellness and Syncing Collected Sensor Data
9
Let us Chat in a Smart Way - Notifications and More

Keeping your application active on a Wear device


When we write an application for contexts, we need to do certain alternatives. We know that when not using the application, we should make that app to sleep in Wear devices for better battery performance, but when we are building an application for maps, it is necessary that maps be visible and active for the user.

Android has a simple configuration for this: a method with few lines that activates the ambient mode:

//oncreate Method
setAmbientEnabled();

This starts the ambient mode on the map. The API swaps to a non-interactive and low-color rendering of the map when the user is no longer actively using the app:

@Override
public void onEnterAmbient(Bundle ambientDetails) {
    super.onEnterAmbient(ambientDetails);
    mMapFragment.onEnterAmbient(ambientDetails);
}

The following code exits the ambient mode on the WearMap. The API swaps to the normal rendering of the map when the user starts actively using the app:

@Override
public void onEnterAmbient...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY