The google i \ o 2013 conference died down. This year it turned out to be some kind of contradictory - nobody showed much, but they didn’t show what was expected. Well, okay, much has already been written about this, an article about something else.
We will talk today about only one innovation, and the problems that it brought me - “Optimization Tips” in the google play console.

It would seem - a good thing - analyzes our application and gives optimization tips. For example, for old projects, it shows languages into which it would not hurt to translate the application, since there are a large number of downloads from these countries.
A little background:
We have one customer in the company for whom we are releasing applications. They are basically all of the same type - they differ only in color scheme and data. The design of the application has been developed for a long time and arranged everything. Applications have always worked on both phones and tablets - the interface is based on fragments. The only thing is that they did not introduce an action bar - well, I never needed it there - the menu was used in the old style.
The android: targetSdkVersion = "10" was registered in the manifest and on all devices either a physical menu button was used, or, if it was not on the device, appeared in the Androids button bar.
')
So, why am I - a couple of days after the conference, the customer asked to post a new application, which by this time had already been developed and tested. No sooner said than done. The process of publishing almost did not differ from the previous ones - the only thing that made screenshots for phones and tablets separately, since the interface now divided them. I posted the application, checked that it appeared in google play on my PHONE, and went home with a clear conscience. No signs of trouble…
The next morning, upon arrival at work, testers reported that the application is only in the phone, but on tablets in the market it can not be found. I began to check - what is the matter. In the lists of supported devices, all the tablets that are available were present. And then I saw a screenshot from the beginning of the article.
Yeah, I thought, and quickly rebuilt and laid out the application with android: targetSdkVersion = "11".
Yeah, google thought, and the second version of the application appeared in google play, available for tablets but ... without a menu button!
I began to look for what is wrong, because I’ve read something like before that if we don’t use the action bar, there’s a button, here’s an excerpt from the
article :
- If you set either the minSdkVersion or the targetSdkVersion to 11 or higher, the system overflow button.
- Otherwise, the button will be running on Android 3.0 or higher.
- If you set minSdkVersion to 10 or lower, set the targetSdkVersion to 11, 12, or 13, and you can’t use it higher.
It would seem that the third point just suits us, but there is a nuance - it says only about the phones! And indeed, the menu button appeared on the phones.
Well, nothing can be done, it remained only to inform the customer about two possible solutions to the problem:
- add action bar
- add a button to the interface, by clicking on which, we will open the menu.
Well, so that in the google play does not lay a non-working version - I decided to roll it back. But then we just found a small bug in the application and decided to fix it and include it in the assembly. I rolled back targetSdkVersion to 10 and laid out the third version (again there was a tip about adapting the application for tablets) ...
What was my surprise when after a while my tablet wanted to upgrade! I updated it to the third version, where there was a menu button! Well, I think, probably just a small bug in google play - it was updated, as there was already a version on the device. But checking it on a “clean” tablet - I also found it and installed it!
I think that this is due to the fact that google extends its filtering only to the newly created application, and if it was previously available for this type of device (the second compiled version), then it removes its restriction. Such a conclusion can be drawn from the fact that in old applications a warning about targetSdkVersion is displayed, but in the search for tablets it is present - if they closed this feature, there would be a lot of disturbances from the developers of old applications.
I hope this experience will be useful and will save time for developers faced with this problem. And in fact, this is even for the better - more developers will begin to think about bringing the look of applications to the style
recommended by the platform .