Designed by Veethemes.com | Gooyaabi

Latest Posts

Showing posts with label Android Wear. Show all posts
Showing posts with label Android Wear. Show all posts
Posted by Hoi Lam, Lead Developer Advocate, Android Wear


Android Wear 2.0 gives users more informative watch faces and provides developers with new ways to build useful apps. These new opportunities have been well received by users and developers alike. To help developers take advantage of these new features, we have released a suite of complication API tools, to make it easier for developers to add complication support to their watch faces, and a new Wear UI library, to help developers build watch friendly user interfaces.


New Complications API tools for Watch Face developers



Complications are bite-sized pieces of information displayed directly on the watch face. They can also be great shortcuts into your favorite apps. We introduced the Complications API last year to enable watch faces to receive data from any app that the user selects, and display the data to the user in a way that is stylistically coherent. Today, we are introducing four new tools to make it easier for watch face developers to integrate with the Complications API:



  • TextRenderer - Auto-sizes text to fit in bounds defined by watch face makers.

  • ComplicationDrawable - A full rendering solution for complications, that handles all the styling for you, and adjusts the layout to fit the space you specify

  • Easy watch face settings sample - Adoptable sample code that makes it easier to build complication settings with a rich and usable experience.

  • Complication test suite - A sample data provider to help check that your watch face can handle all the combinations of fields that can make up complication data.



It's never been easier to integrate complications into your watch faces.


New Wear UI Library for Wear developers



We have provided Android view components for building watch friendly user interfaces since the launch of Android Wear 1.0. Developers have told us that they would like to see these components open sourced. So, starting at Google I/O, we are open sourcing some components and providing some Android Wear UI components in the Android Support Library. This brings a number of advantages, including more consistent APIs with the rest of the Support Library, more frequent releases, and better responsiveness to developer feedback. We will:


  • Migrate Wearable Support classes - Migrate and update Android Wear specific view components, such as WearableRecyclerView, from android.support.wearable.view in Wearable Support to android.support.wear.widget in the Android Support Library. This new package is available as open source. In terms of developer impact, we expect the migration process to be simple, with minor API name changes to bring consistency with the existing Android Support Library.

  • Merge some Android Wear functionality to Android - Some Android Wear components have a lot of overlap with Android, e.g. CircledImageView and DelayedConfirmationView. We will merge the Android Wear specific functionality with the Android counterparts under android.support.v4.widget.

  • Deprecate outdated user interface patterns - Two user interface patterns are deprecated with Android Wear 2.0: the Card pattern and the Multi-directional layout. As a result, we have deprecated all supporting classes, such as GridViewPager and CardFragment. Please refer to the class reference docs for their replacements.



In the first wave of these changes, we migrated the WearableRecyclerView, BoxInsetLayout and SwipeDismissFrameLayout classes to the new Android Wear UI Library. We expect the migration process to continue during 2017, and developers will have until mid-2018 to migrate to the new UI components. For additional information, see Using the Wear UI Library.



Get started and give us feedback!



To get started with these new tools, simply update the Android Support Library in Android Studio and update your gradle build files to import the new support libraries. In addition to the documentation links above, check out the Google I/O session - Android Wear UI development best practice - where lead engineers for these tools will be on-hand to explain the technical details.



We will continue to update these tools over the next few months, based on your feedback. The sooner we hear from you, the more we can include, so don't be shy! Let us do some of the heavy lifting for your Android Wear apps and watch faces.




Posted by Hoi Lam, Lead Developer Advocate, Android Wear







Today, we are releasing the final SDK for Android Wear 2.0. In this release, we have added support for the new hardware features announced yesterday. If you have not done so already, it really is time to publish your apps so as to not miss the consumer hardware launch tomorrow.
Throughout the developer preview program, you have given us a lot of constructive feedback as well as bug reports. Thank you again!



Android Wear 2.0 recap





Android Wear 2.0 is our biggest update since we launched Wear in 2014, with numerous platform and developer enhancements. Some of the highlights include:

  • Material Design for Android Wear - A new system user interface and design guidelines, featuring a darker colour palette, vertical layout and visual components such as the WearableRecyclerView and WearableNavigationDrawer. We have also enhanced notifications on the watch with the new MessagingStyle rich notification style and inline actions.

  • Watch Face Complications - Complications are areas of the watch face that display information other than time. Apps can supply data to supported watch faces by creating a ComplicationProviderService, and watch faces can render this data in a style that suits the watch face design.

  • Standalone Android Wear apps and iOS support - Apps can now be downloaded directly to Wear devices via an on-watch Google Play Store. In addition, these apps can access the internet directly without relying on phone apps. This means that apps can now run on Android Wear devices that are paired to iOS devices.

New hardware support

The first two watches with Android Wear 2.0 give users more ways to interact with their smartwatches. In the final SDK, we have added API support for physical button locations and rotary input. At present, developers will need the new LG Watch Style or LG Watch Sport to test these new functionalities; however, we are working to add these new hardware features to the emulator. Stay tuned for updates! The SDK also includes a few other final bug fixes, such as support for more than three items in the Wearable Action Drawer.

App review changes

Now that Android Wear 2.0 is live, we'll soon update the Android Wear App Quality review process with two important changes. First, enhancing your phone app notifications for Android Wear will no longer be sufficient for passing the review. Second, it will soon be required that you upload a watch APK that's compatible with Android Wear 2.0. Only apps that pass these criteria will receive badging in Play Store on the phone and be eligible for top charts for Android Wear apps. These changes will ensure a more consistent experience for users and allow us to streamline the review process for you.

The journey doesn't stop here!

The Android Wear 2.0 developer preview lasted longer than we originally planned, but we think that the extra time has paid off in a big way. Thank you once again for your input and patience. You helped us achieve a higher quality bar than we could have achieved on our own.



We have integrated the Android Wear 2.0 Developer Preview documentation into the main Wear developer documentation site and we continue to maintain links to the factory images for the preview devices. For developer related bugs, please continue to file developer bug reports or post comments in our Android Wear Developers community.



From the Android Wear team: Thank you again for your feedback and support!










Posted by Hoi Lam, Developer
Advocate 









Cross platform support by Telegram Messenger





Today, we are releasing the fifth and final developer preview for Android Wear
2.0. In this release, we have added iOS support and included a number of bug
fixes and enhancements. Apps compiled with this preview are now ready for final
submission to the Google Play Store, so it's time to publish
your apps
. As Android Wear 2.0 approaches its final release in early
February, we would like to thank you for your continued feedback during the
developer preview program. Your input has helped us uncover bugs as well as
drive critical product decisions. Thank you!





iOS Support





Since 2015,
you've been able to pair Android Wear watches with iPhones, and now you can
distribute your apps to iPhone-paired watches as well. To do so, just set the standalone=true
flag in your watch app manifest. This lets the Play Store know that your watch
app doesn't require an Android phone app, and therefore can appear in the Play
Store
on watches paired to iPhones. To pair your watch to an iPhone and
test, just follow these
steps
.





<application …>
<meta-data android:name="com.google.android.wearable.standalone" android:value="true"/>

</application>




The available network bandwidth for standalone apps can be lower than expected,
as the platform balances battery savings vs network bandwidth. Make sure to
check out these guidelines
for accessing the network, including accessing Wi-Fi and cellular networks on
watches paired with iPhones.




Also with this developer preview release, Android Wear apps running on watches
paired with iOS devices will be able to perform phone hand-off flows such as OAuth
and RemoteIntent
for launching a web page on a paired iOS device.





Uploading Your App to the Google Play Store





The final developer preview includes an update to the Wearable Support Library.
Apps compiled with API level 25 and this support library are considered ready
for deployment in the Google Play Store. Please note that there are no updates
to the preview watch image or emulator in this developer preview release.





Other Enhancement and Bug Fixes






  • Navigation Drawer: Flip
    a flag
    to toggle to the single-page, icon-only navigation drawer, which provides
    faster, more streamlined navigation to different views in your app.

  • NFC HCE support: NFC
    Host Card Emulation
    FEATURE_NFC_HOST_CARD_EMULATION is now
    supported.

  • ProGuard and Complication API: New ProGuard configuration
    means complication data container classes will no longer be obfuscated. This
    fixes a ClassNotFoundException when watch faces are trying to access data supplied
    by a complication data provider.






Countdown to Launch





Thank you for the fantastic level of feedback we have gotten from you as
developers. Check out g.co/wearpreview for
the latest builds and documentation, and be sure to publish
your apps
before the Android Wear 2.0 consumer launch in early February. As
we work towards the consumer launch and beyond, please continue filing bugs or posting comments in our Android Wear
Developers
community. We can't wait to see your Android Wear 2.0 apps!


Kacey Fahey, Marketing Programs Manager, Google Play




The upcoming Android Wear 2.0 experience will introduce standalone apps, expanding your potential reach to both Android and iOS audiences with Wear devices. Users will be able to search, install, and use apps without ever leaving their device. See how other developers are enhancing their user experience with standalone apps for messaging, travel & local, and health & fitness.




Glide




Having a watch app further simplifies video messaging with Glide.
Using the Wear Complications
API
, Glide is now able to live broadcast directly from the watch face. By
tapping contact shortcuts from the watch face, you can now launch directly into
a conversation. This experience brings speed and intimacy to the world of
messaging, making wrist-based communication more accessible and effortless.




Foursquare




Travelers around the world use Foursquare's
Android Wear app to discover hidden gems and be in the know about the best
places to eat, drink and explore. With their upcoming 2.0 app, the team has a
clean new canvas for rich notifications giving users an immersive experience
with Foursquare content.




"The standalone nature of the Android Wear 2.0 app will offer a big boost in
search performance and app responsiveness so you spend less time staring at the
screen and more time exploring the world around you,"
said Kyle Fowler,
Software Engineer at Foursquare.




Lifesum





Lifesum
helps users make better food choices, improve their exercise, and reach health
goals. The upcoming 2.0 experience complements the existing Lifesum mobile app
and as a standalone app, it will allow users to more easily track water and
meals throughout the day.


"It's all about increasing access and being there for the user in a quick
and simple way. We believe a simplified way of tracking meals and water will
make it easier for our users on their journey of becoming healthier and
happier,"
said Joakim Hammer, Android Developer at Lifesum




Check out g.co/wearpreview for the latest builds and documentation about the recently released Android Wear Developer Preview 4.




How useful did you find this blogpost?















Posted by Hoi Lam, Developer
Advocate




A key part of Android Wear 2.0 is letting
watch apps work as standalone apps, so users can respond to messages, track
their fitness, and use their favorite apps, even when their phone isn't around.
Developer Preview 4 includes a number of new APIs that will help you build more
powerful standalone apps.


Seamless authentication



To make authentication a seamless experience for both Android phone and iPhone
users, we have created new APIs for href="https://developer.android.com/wear/preview/features/auth-wear.html?utm_campaign=android wear_launch_developerpreview_121316&utm_source=anddev&utm_medium=blog">OAuth
and added support for one-click Google Sign-in. With the OAuth API for
Android Wear, users can tap a button on the watch that opens an authentication
screen on the phone. Your watch app can then authenticate with your server side
APIs directly. With Google Sign-In, it's even easier. All the user needs to do
is select which account they want to authenticate with and they are done.


In-app billing



In addition to paid apps, we have added href="https://developer.android.com/training/in-app-billing/index.html?utm_campaign=android wear_launch_developerpreview_121316&utm_source=anddev&utm_medium=blog">in-app
billing support, to give you another way to monetize your Android Wear app
or watch face. Users can authorize purchases quickly and easily on the watch
through a 4-digit Google Account PIN. Whether it's new levels in a game or new
styles on a watch face, if you can build it, users can buy it.


Cross-device promotion



What if your watch app doesn't work standalone? Or what if it offers a better
user experience when both the watch and phone apps are installed? We've been
listening carefully to your feedback, and we've added href="https://developer.android.com/wear/preview/features/standalone-apps.html?utm_campaign=android wear_launch_developerpreview_121316&utm_source=anddev&utm_medium=blog#detecting-your-app">two
new APIs (PlayStoreAvailability and RemoteIntent)
to help you navigate users to the Play Store on a paired device so they can
more easily install your app. Developers can also open custom URLs on the phone
from the watch via the new RemoteIntent API; no phone app or data
layer is required.



class="prettyprint">// Check Play Store is available
int playStoreAvailabilityOnPhone =
PlayStoreAvailability.getPlayStoreAvailabilityOnPhone(getApplicationContext());

if (playStoreAvailabilityOnPhone == PlayStoreAvailability.PLAY_STORE_ON_PHONE_AVAILABLE) {
// To launch a web URL, setData to Uri.parse("https://g.co/wearpreview")
Intent intent =
new Intent(Intent.ACTION_VIEW)
.addCategory(Intent.CATEGORY_BROWSABLE)
.setData(Uri.parse("market://details?id=com.google.android.wearable.app"));
// mResultReceiver is optional; it can be null.
RemoteIntent.startRemoteActivity(this, intent, mResultReceiver);
}

Swipe-to-dismiss is back



Many of you have given us the feedback that the swipe-to-dismiss gesture from
Android Wear 1.0 is an intuitive time-saver. We agree, and have reverted back to
the previous behavior with this developer preview release. To support
swipe-to-dismiss in this release, we've made the following platform and API
changes:


  • Activities now automatically support swipe-to-dismiss.
    Swiping an activity from left to right will result in it being dismissed and the
    app will navigate down the back stack.
  • New Fragment and View support. Developers can wrap the
    containing views of a Fragment or Views in general in the new
    SwipeDismissFrameLayout to implement custom actions such as going
    down the back stack when the user swipes rather than exiting the activity.
  • Hardware button now maps to "power" instead of "back" which
    means it can no longer be intercepted by apps.


Additional details are available under the href="https://developer.android.com/wear/preview/behavior-changes.html?utm_campaign=android wear_launch_developerpreview_121316&utm_source=anddev&utm_medium=blog">behavior
changes section of the Android Wear Preview site.


Compatibility with Android Wear 1.0 apps



Android Wear apps packaged using the legacy embedded app mechanism can now be
delivered to Android Wear 2.0 watches. When a user installs a phone app that
also contains an embedded Android Wear app, the user will be prompted to install
the embedded app via a notification. If they choose not to install the embedded
app at that moment, they can find it in the Play Store on Android Wear under a
special section called "Apps you've used".



Despite support for the existing mechanism, there are significant benefits for
apps that transition to the href="https://developer.android.com/wear/preview/features/app-distribution.html?utm_campaign=android_discussion_wearpreview_092916&utm_source=anddev&utm_medium=blog#publish">multi-APK
delivery mechanism. Multi-APK allows the app to be searchable in the Play
Store on Android Wear, to be eligible for merchandising on the homepage, and to
be remotely installed from the web to the watch. As a result, we strongly
recommend that developers move to multi-APK.


More additions in Developer Preview 4



  • href="https://developer.android.com/wear/preview/features/ui-nav-actions.html?utm_campaign=android wear_launch_developerpreview_121316&utm_source=anddev&utm_medium=blog">Action
    and Navigation Drawers: An enhancement to peeking behavior
    allows the user to take action without scrolling all the way to the top or
    bottom of a list. Developers can further fine-tune drawer peeking behavior
    through new APIs, such as setShouldPeekOnScrollDown for the action
    drawer.
  • href="https://developer.android.com/wear/preview/features/wearable-recycler-view.html?utm_campaign=android wear_launch_developerpreview_121316&utm_source=anddev&utm_medium=blog">WearableRecyclerView:
    The curved layout is now opt-in, and with this, the WearableRecyclerView is now
    a drop-in replacement for RecyclerView.
  • href="https://developer.android.com/wear/preview/features/complications.html?utm_campaign=android wear_launch_developerpreview_121316&utm_source=anddev&utm_medium=blog#using_fields_for_complication_data">Burn-in
    protection icon for complications: Complication data providers can now
    provide icons for use on screens susceptible to burn-in. These burn-in-safe
    icons are normally the outline of the icon in interactive mode. Previously,
    watch faces may have chosen not to display the icon at all in ambient mode to
    prevent screen burn-in.

Feedback welcome!



Thanks for all your terrific feedback on Android Wear 2.0. Check out href="http://g.co/wearpreview">g.co/wearpreview for the latest builds and
documentation, keep the feedback coming by href="http://g.co/wearpreviewbug">filing bugs or posting in our href="https://plus.google.com/communities/113381227473021565406">Android Wear
Developers community, and stay tuned for Android Wear Developer Preview 5!


Posted by Hoi Lam, Android Wear
Developer Advocate



At Google I/O 2016, we launched the Android
Wear 2.0 Developer Preview
, which gives developers early access to the next
major release of Android Wear. Since I/O, feedback from the developer community
has helped us identify bugs and shape our product direction. Thank you!



Today, we are releasing the second developer preview with new functionalities
and bug fixes. Prior to the consumer release, we plan to release additional
updates, so please send us your
feedback
early and often. Please keep in mind that this preview is a work in
progress, and is not yet intended for daily use.


What’s new?



  • Platform API 24 - We have incremented the Android Platform
    API version number to 24 to match Nougat. You can now update your Android Wear
    2.0 Preview project’s compileSdkVersion to API 24, and we recommend
    that you also update targetSdkVersion to API 24.
  • Wearable Drawers Enhancements - We launched the href="https://developer.android.com/wear/preview/features/ui-nav-actions.html?utm_campaign=android wear_launch_preview2_071216&utm_source=anddev&utm_medium=blog">wearable
    drawers as part of the Android Wear 2.0 Preview 1, along with UX guidelines
    on how to best integrate the href="https://www.google.com/design/spec-wear/components/navigation-drawer.html">navigation
    drawer and href="https://www.google.com/design/spec-wear/components/action-drawer.html">action
    drawer in your Android Wear app. In Preview 2, we have added additional
    support for wearable drawer peeking, to make it easier for users to access these
    drawers as they scroll. Other UI improvements include automatic peek view and
    navigation drawer closure and showing the first action in
    WearableActionDrawer’s peek view. For developers that want to make
    custom wearable drawers, we’ve added peek_view and
    drawer_content attributes to WearableDrawerView. And
    finally, navigation drawer contents can now be updated by calling href="https://developer.android.com/reference/android/widget/ArrayAdapter.html?utm_campaign=android wear_launch_preview2_071216&utm_source=anddev&utm_medium=blog#notifyDataSetChanged()">notifyDataSetChanged.
  • Wrist Gestures: Since last year, users have been able to
    scroll through the notification stream via href="https://support.google.com/androidwear/answer/6312406?hl=en">wrist
    gestures. We have now opened this system to developers to use within their
    applications. This helps improve single hand usage, for when your users need
    their other hand to hold onto their shopping or their kids. See the code sample
    below to get started with gestures in your app:

 public class MainActivity extends Activity {  
...
@Override /* KeyEvent.Callback */
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_NAVIGATE_NEXT:
Log.d(TAG, "Next");
break;
case KeyEvent.KEYCODE_NAVIGATE_PREVIOUS:
Log.d(TAG, "Previous");
break;
}
// If you did not handle, then let it be handled by the next possible element as deemed by
// Activity.
return super.onKeyDown(keyCode, event);
}
}


Get started and give us feedback!



The Android Wear 2.0 Developer Preview includes an updated SDK with tools and
system images for testing on the official Android emulator, the href="https://store.google.com/product/lg_watch_urbane_2nd_edition_lte">LG Watch
Urbane 2nd Edition LTE, and the href="https://store.google.com/product/huawei_watch">Huawei Watch.



To get started, follow these steps:


  1. Take a video tour
    of the Android Wear 2.0 developer preview
  2. Update to Android Studio v2.1.1 or later
  3. Visit the Android Wear 2.0 Developer
    Preview site
    for downloads and documentation
  4. Get the emulator system images through the SDK Manager or href="https://developer.android.com/wear/preview/downloads.html?utm_campaign=android wear_launch_preview2_071216&utm_source=anddev&utm_medium=blog">download the
    device system images from the developer preview downloads page
  5. Test your app with your supported device or emulator
  6. Give us feedback


We will update this developer preview over the next few months based on your
feedback. The sooner we hear from you, the more we can include in the final
release, so don't be shy!