Last Countdown - Google has fun
Some time ago, I wrote about the ridiculous verification method, “Are you a goat, user?” . Today I discovered another funny method for the brand new Android 8.0.
I accidentally re-read the documentation for the Chronometer component . Found that in API 24 there are new methods that allow the chronometer to work in countdown mode. He began to check, wrote a simple example. Everything works. The code is trivial, I will not give it here.
And then the eye caught on another new method that was added to API 26 - isFinalCountDown () . The description of the method was very scarce - whether this is the final countdown. For some reason I thought that with its help you can determine the moment when the counter in the chronometer becomes 00:00. Although it seems you can independently arrange such a check. It’s strange. I decided to call the method at the click of a button. Run on the emulator.
The effect was unexpected. Suddenly, the Youtube application starts and the song of the group Europe Last Count begins to play in it. At first I thought it was some kind of glitch and I clicked somewhere in the wrong place. But the song title coincided with the method. I started it again - the video starts again. Became interesting. I began to search for the sources of Android 8.0 and found this place .
In the method, the address of the clip on YouTube is protected, which is launched using the Intent mechanism .
Screenshot of the launched video:
I accidentally re-read the documentation for the Chronometer component . Found that in API 24 there are new methods that allow the chronometer to work in countdown mode. He began to check, wrote a simple example. Everything works. The code is trivial, I will not give it here.
And then the eye caught on another new method that was added to API 26 - isFinalCountDown () . The description of the method was very scarce - whether this is the final countdown. For some reason I thought that with its help you can determine the moment when the counter in the chronometer becomes 00:00. Although it seems you can independently arrange such a check. It’s strange. I decided to call the method at the click of a button. Run on the emulator.
public void onClick(View view) {
mChronometer.isTheFinalCountDown();
}
The effect was unexpected. Suddenly, the Youtube application starts and the song of the group Europe Last Count begins to play in it. At first I thought it was some kind of glitch and I clicked somewhere in the wrong place. But the song title coincided with the method. I started it again - the video starts again. Became interesting. I began to search for the sources of Android 8.0 and found this place .
/**
* @return whether this is the final countdown
*/
public boolean isTheFinalCountDown() {
try {
getContext().startActivity(
new Intent(Intent.ACTION_VIEW, Uri.parse("https://youtu.be/9jK-NcRmVcw"))
.addCategory(Intent.CATEGORY_BROWSABLE)
.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT
| Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT));
return true;
} catch (Exception e) {
return false;
}
}
In the method, the address of the clip on YouTube is protected, which is launched using the Intent mechanism .
Screenshot of the launched video: