Thursday, February 23, 2017

Keeping up to Date with the Support Library



Posted by Agustin Fonts, Product Manager, Android Support Library


It's important to keep current when you're dealing with technology. That’s why we're constantly working to improve the quality of our software, particularly libraries that are linked into your apps, such as the Support Library.  The Support Library is a suite of libraries that provides backward compatibility along with additional features across many Android releases.





We have just released version 25.2 of the Support Library.  If you're making use of the android.support.v7.media.MediaRouter class in revision 25.1.1 or 25.1.0, we strongly recommend that you update due to a known issue.  If you haven't updated recently, you've missed out on some great bug fixes such as these:





25.2:



  • Corrected a severe mediarouter issue in which using an A2DP Bluetooth device and media routing APIs could cause the device to become unresponsive, requiring a reboot


  • Showing a slide presentation with screen mirroring no longer causes the device to disconnect from Wi-Fi


  • Media button now properly handles media apps that did not register themselves with setMediaButtonReceiver()


  • TextInputLayout correctly overlays hint and text if text is set by XML (AOSP issue 230171)


  • Corrected a memory leak in MediaControllerCompat (AOSP issue 231441)


  • RecyclerView no longer crashes when recycling view holders (AOSP issue 225762)


Reporting (and fixing) a Bug





The Support Library is developed by the Android Framework and Developer Relations teams, and, just like the Android platform, you can file bugs using the AOSP issue tracker, or submit fixes to our Git repository. Your feedback is critical in helping us to make the Support Library the most productive environment to use for developing Android applications.


Wednesday, February 22, 2017

Publish your app with confidence from the Google Play Developer Console


Posted by Kobi Glick, Product Manager, Google Play



Publishing a new app, or app update, is an important and exciting milestone for
every developer. In order to make the process smoother and more trackable, we're
announcing the launch of a new way to publish apps on Google Play with some new
features. The changes will give you the ability to manage your app releases with
more confidence via a new manage releases page in the Google Play Developer Console.














Manage your app updates with clarity and control




The new manage releases page is where you upload alpha, beta, and production
releases of your app. From here, you can see important information and the
status of all your releases across tracks.








The new manage releases page.


Easier access to existing and new publishing
features





Publishing an app or update is a big step, and one that every developer wants to
have confidence in taking. To help, we've added two new features.


First, we've added a validation step that highlights potential issues before you
publish. The new "review and rollout" page will appear before you confirm the
roll out of a new app and flag if there are validation errors or warnings. This
new flow will make the app release process easier, especially for apps using
multi-APK. It also provides new information; for example, in cases where you
added new permissions to your app, the system will highlight it.











Second, it's now simpler to perform and track staged roll-outs during the
publishing flow. With staged rollouts, you can release your update to a growing
% of users, giving you a chance to catch and address any issues before affecting
your whole audience.




If you want to review the history of your releases, it is now possible to track
them granularly and download previous APKs.




Finally we've added a new artifacts library under manage releases where you can
find all the files that help you manage a release.



Start using the new manage releases page today


You can access the new manage releases page in the Developer Console. Visit the
Google
Play Developer Help Center
for more information. With these changes, we're
helping you to publish, track and manage your app with confidence on Google
Play.








How useful did you find this blogpost?




                                                                              





Tuesday, February 21, 2017

Build flexible layouts with FlexboxLayout


Posted by Takeshi Hagikura, Developer Programs Engineer



At Google I/O last year we announced ConstraintLayout,
which enables you to build complex layouts while maintaining a flat view
hierarchy. It is also fully supported in Android Studio's Visual
Layout Editor
.




At the same time, we open sourced FlexboxLayout to bring the
same functionalities of the CSS
Flexible Layout module
to Android. Here are some cases where
FlexboxLayout is particularly effective.



FlexboxLayout can be interpreted as an advanced LinearLayout
because both layouts align their child views sequentially. The significant
difference between LinearLayout and FlexboxLayout is that
FlexboxLayout has a feature for wrapping.




That means if you add the flexWrap="wrap" attribute,
FlexboxLayout puts a view to a new line if there is not enough
space left in the current line as shown in the picture below.











One layout for various screen sizes


With that characteristic in mind, let's take a case where you want to put views
sequentially but have them move to new lines if the available space changes (due
to a device factor, orientation changes or the window resizing in the
multi-window mode).










Nexus5X portrait













Nexus5X landscape











Pixel C with multi window mode enabled, divider line on the left.












Pixel C with multi window mode enabled, divider line on the middle.













Pixel C with multi window mode enabled, divider line on the right.







You would need to define multiple DP-bucket layouts (such as layout-600dp,
layout-720dp, layout-1020dp) to handle various screen sizes with traditional
layouts such as LinearLayout or RelativeLayout. But
the dialog above is built with a single FlexboxLayout.




The technique used in the example is setting the flexWrap="wrap" as
explained above,




<com .google.android.flexbox.flexboxlayout 
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:flexwrap="wrap">

then you can get the following layout where child views are aligned to a new
line instead of overflowing its parent.

















Another technique I'd like to highlight is setting the
layout_flexGrow attribute to an individual child. This helps
improve the look of the final layout when free space is left over. The
layout_flexGrow attribute works similar to the
layout_weight attribute in LinearLayout. That means
FlexboxLayout will distribute the remaining space according to the
layout_flexGrow value set to each child in the same line.




In the example below, it assumes each child has the layout_flexGrow
attribute set to 1, so free space will be evenly distributed to
each of them.


 <android .support.design.widget.TextInputLayout
android:layout_width="100dp"
android:layout_height="wrap_content"
app:layout_flexgrow="1">












You can check out the complete layout
xml
file in the GitHub repository.





RecyclerView integration 


Another advantage of FlexboxLayout is that it can be integrated
with RecyclerView.
With the latest release of the alpha
version
the new FlexboxLayoutManager extends
RecyclerView.LayoutManager, now you can make use of the Flexbox
functionalities in a scrollable container in much more memory-efficient way.




Note that you can still achieve a scrollable Flexbox container with
FlexboxLayout wrapped with ScrollView. But, you will
be likely to experience jankiness or even an OutOfMemoryError if the number of
items contained in the layout is large, as FlexboxLayout doesn't
take view recycling into account for the views that go off the screen as the
user scrolls.




(If you would like to learn more about the RecyclerView in details, you can
check out the videos from the Android UI toolkit team such as 1, 2)




A real world example where the RecyclerView integration is useful
is for apps like the Google Photos app or News apps, both expect large number of
items while needing to handle various width of items.




One example is found in the demo
application
in the FlexboxLayout repository. As you can see in
the repository, each image shown in RecyclerView has a different
width. But by setting the flexWrap setting to wrap,




FlexboxLayoutManager layoutManager = new FlexboxLayoutManager();
layoutManager.setFlexWrap(FlexWrap.WRAP);

and setting the flexGrow (as you can see, you can configure the
attributes through FlexboxLayoutManager and
FlexboxLayoutManager.LayoutParams for child attributes instead of
configuring it from xml) attribute to a positive value for each child,


void bindTo(Drawable drawable) {
mImageView.setImageDrawable(drawable);
ViewGroup.LayoutParams lp = mImageView.getLayoutParams();
if (lp instanceof FlexboxLayoutManager.LayoutParams) {
FlexboxLayoutManager.LayoutParams flexboxLp =
(FlexboxLayoutManager.LayoutParams) mImageView.getLayoutParams();
flexboxLp.setFlexGrow(1.0f);
}
}

you can see every image fits within the layout nicely regardless of the screen
orientation.












If you would like to see complete FlexboxLayout example, you can check:







What's next?


Check out the full documentation for other
attributes to build flexible layouts tailored for your needs. We're very open to
hear your feedback, if you find any issues or feature requests, please file an
issue on the GitHub
repository
.









Thursday, February 16, 2017

And the winners of the Google Play Indie Games Contest in Europe are...



Posted by Matteo Vallone, Google Play Games Business Development






Today, at Saatchi Gallery in London, we hosted the final event of the first Google Play Indie Games Contest in Europe. The 20 finalists, selected from nearly 1000 submissions, came from 12 countries to showcase their games to an excited room of gamers, industry experts and press. Selected based on the votes of the attendees and the Google Play team, the Top 10 pitched in front of a jury of industry experts who chose the top winners.












Stay tuned for more pictures and a video of the event.




Without further ado, join us in congratulating the winners!




Winner & Unity prize winner:









Reigns, by Nerial, from the United Kingdom




You are the King. For each decision, you only have two choices. Survive the exercise of power and the craziness of your advisors... as long as you can.







Runners up:












The Battle of Polytopia, by Midjiwan AB, from Sweden




A turn based strategic adventure. It's a game about ruling the world, fighting evil AI tribes, discovering new lands and mastering new technologies.




Causality, by Loju, from the United Kingdom




A puzzle about manipulating time, altering the sequence of events and changing the outcome of each level to help a group of astronauts find a route to safety.








The other top games selected by the event attendees and the Google Play team are:

















Blind Drive, by Lo-Fi People, from Israel




You're driving blindfolded as a mysterious voice gives you suicidal commands on the phone. Survive on-rushing vehicles using only your hearing to guide you.




Gladiabots, by GFX47, from France




A competitive tactical game in which you design the AI of your robot squad. Use your own strategy, refine it online and fight for the top of the leaderboard.




Happy Hop: Kawaii Jump, by Platonic Games, from Spain




This isn't just an original one-tap endless hopper, it's also the cutest one. Ever wondered what's in the end of the rainbow? That would be Happy Hop.




Lost in Harmony, by Digixart Entertainment, from France




Experience music in a new way with the combination of rhythmic tapping and choreographic runner to go through two memorable journeys with Kaito and M.I.R.A.I.




Paper Wings, by Fil Games, from Turkey




A fast-paced arcade game which puts you in control of an origami bird. Avoid the hazards and collect the falling coins to keep your paper bird alive.




Pinout, by Mediocre, from Sweden




A breathtaking pinball arcade experience: race against time in a continuous journey through this canyon of pulsating lights and throbbing retro wave beats.




Rusty Lake: Roots, by Rusty Lake, from Netherlands




James Vanderboom's life drastically changes when he plants a special seed in the garden. Expand your bloodline by unlocking portraits in the tree of life.









Check out the prizes


The prizes of this contest were designed to help the winners showcase their art and grow their business on Android and Google Play, including:



  • YouTube influencer campaigns worth up to 100,000 EUR



  • Premium placements on Google Play



  • Tickets to Google I/O 2017 and other top industry events



  • Promotions on our channels



  • Special prizes for the best Unity game



  • And more!




What’s next?


The week is not over just yet for Indie games developers. Tomorrow we are hosting the Indie Games Workshop for all indie games developers from across EMEA in the new Google office in Kings Cross.




It’s been really inspiring to see the enthusiasm around this inaugural edition, and the quality and creativity of the indie games developed across the eligible European countries. We are looking forward to bringing a new edition of the contest to you in late 2017.





How useful did you find this blogpost?




                                                                              





Wednesday, February 15, 2017

Tips for building high-quality and accessible financial services apps





Posted by Joel Newman & Ashraf Hassan, Strategic Partnerships, Finance, Google Play



Millions of people around the globe have limited or no access to basic financial
services to enable them to manage their day-to-day finances. Mobile technology
can help bridge this gap by connecting historically underserved consumers with
high-quality tools to help them improve their financial health.




Often faced with an uncertain regulatory environment and/or a highly fragmented
financial marketplace, many developers struggle with building great app
experiences while also navigating this complex financial space. That's why we
recently worked with CFSI, the authority on consumer financial health, to create
the FinTech App Development Compass, a six-step guide for building high quality
mobile apps to make financial services more accessible on Google Play.




Below, we're sharing six tips to consider when building a financial services
app. For more, read the complete FinTech App Development Compass.




Tip 1: Know Your User


Understand who your consumer is and what difference your product can make in
their day-to-day life. What are their financial needs? How can your product
improve their financial health? How does your product fit within the context of
their financial lives?




Tip 2: Focus on Access


Responsibly expand access to your product. Consider how your product can fit
seamlessly into your users' routines. Consider your users' circumstances,
including that English may not be their first language and that they may be
using older devices with limited data plans.




Tip 3: Establish and Maintain Trust


Trust is at a premium in the financial space. Make sure you are developing
mutually beneficial financial solutions that deliver clear and consistent value.
Similarly, make sure you are using the latest security tools available from the
Android platform to secure your users' data.




Tip 4: Test and Iterate





Before releasing any product to the public, make sure it has been thoroughly
tested. From a financial perspective, be sure to measure the actual impact of
your product on users over time. From a technological perspective, be sure to
leverage Google Play alpha and beta channels for distributing apps before their
public release.




Tip 5: Drive Positive User Behavior


Drive positive consumer behavior through smart design and communication.
Leverage the Android platform tools like Material Design and notifications to
steer users toward positive action or take financial action at appropriate
times.




Tip 6: Recognize the Value of Mutual Success


Remember that the best business models are win-win: If your users' financial
health improves, your company profits. Consider embedding financial impact and
technological tracking capabilities within your platform from the beginning.




For additional information, refer to the CFSI Compass Principles and get the Playbook for
Developers app
to stay up-to-date with more features and best practices that
will help you grow a successful business on Google Play.







How useful did you find this blogpost?




                                                                              





Thursday, February 9, 2017

Android Wear 2.0 is here with new hardware features!



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!