Profile cover photo
Profile photo
Ted Cannelongo
34 followers
34 followers
About
Ted's posts

With the new PIP support in Android N, is there a way to make a current activity switch to PIP and launch a new activity? When I tested it briefly, it appeared that I could take the player and move it to PIP, but then focus would just return to the previous activity. I can't have the player start the new activity, as it will start inside the PIP window, and while I could certainly have the previous activity start a new one when it receives focus in such an instance, that really wouldn't leave the back stack in the state I'd want it in. I think ideally what I'd want to do is launch a new activity from the player, at which time the video would switch to PIP mode but remain on the back stack. When the user would navigate back from the second activity, it would just restore the player back to full screen. It doesn't seem that PIP is really designed to work in that way in the current iteration.

Post has attachment
Anyone know where the recommendation-app support library is to be found?  According to https://developer.android.com/tools/support-library/features.html, this would be in the customtabs folder, but I'm pretty sure that's a copy/paste error.  That library definitely doesn't include the recommendation classes, and they say the same thing for other new libraries like percent that do have their own folder.  However, there's no recommendation-app library to be found among the rest.

Recently got a few crash reports, all appearing to be from a Sony Bravia 4K TV (SVP-DTV15) that appears to be running 5.0.2, but both have me a bit puzzled.

1.) The first is an NPE when attempting to resume my main player activity.  Some background: I use requestVisibleBehind so that the video can continue to play when the user presses the Home button on the remote.  Since I advance to new videos automatically, I want to ensure that the PlaybackOverlayFragment doesn't display in this instance.  This fragment is instantiated and configured in onCreate for the activity.  In the version that is published, I'm removing the fragment in onPause and adding it again in onResume.  It looks like when it crashed on the Bravia, the variable that represented the PlaybackOverlayFragment was null, as the detailed exception stated "Attempt to write to field 'android.app.FragmentManagerImpl android.app.Fragment.mFragmentManager' on a null object reference."  I guess I'm trying to figure out how that could have happened.  As I see it, either the activity is already running, and thus would have already passed through onCreate to give that variable a value, or it isn't running, in which case it would have to go through onCreate anyway.  I never reassign that variable anywhere (setting it to null, for instance).  I've since revised this to hide and show the fragment instead, which works better as long as there are no other focusable items, but either way, I'd be trying to perform an operation on a null value.  I've not been able to reproduce this, nor have I seen any other crash reports for this on devices other than the Bravia.

2.) The other error I've seen twice on Bravia TVs is "Encountered EGL error 12291 EGL_BAD_ALLOC during rendering" on RenderThread, which I resume is happening when trying to animate the PlaybackOverlayFragment, but I'm really at a loss on this one.  Anyone else encountered this one?

Post has attachment
I know that there's virtually no Australian content yet for Android TV despite the Nexus Player officially going on sale there.  I did take the time to build a channel lineup specific to Australia into Class6ix, though, including local content if you're near some major metro areas.  Since Ausdroid's survey of the major content providers suggests that official entertainment apps for the platform are several months away at best, at least this will give you a way to get news content geared towards Australia from most of the major sources.

Post has attachment
Even though none of the major broadcasters in Australia are ready to support Android TV right now, if you're interested in getting a news stream, Class6ix will allow you to select your location and will pull in stories from sources including Network 7, ABC, Fox Sports Australia, News Corp, SBS 2, Sky News Australia, and The Australian.  Local content is also available for Sydney, Perth, Adelaide, and Darwin.  As you watch or skip past stories, the app will learn what interests you most and will customize the newscast accordingly.  In addition to Android TV, you can also watch on your mobile device or through Chromecast.

Post has attachment
After considerable testing, this appears to be the optimal and most efficient way to draw a poop emoji.
Photo

Post has attachment
For those in the AAA audience with an ADT-1 or Nexus Player, there are some apps available now that aren't in the curated Play Store on the device itself, including a TWiT.TV app and a news app I created called Class6ix.  There are a few third-party apps besides those created by Google that are taking advantage of the voice search from the global search screen.  My app supports it, and I've also seen search results from Bloomberg+ show up (though a warning that their app was doing some excessive recommendation updates and can make those cards go a little wonky).  I'm surprised that Netflix doesn't yet feature this.  See the link for the list of apps supporting and approved for Android TV that haven't hit the official Google Play Store app yet.

Well, now I'm confused.  I just got a rejection notice stating that my app doesn't honor KEYCODE_MEDIA_PLAY_PAUSE, but I'm currently toggling between play and pause in the onKeyUp event when that keyCode is sent in my PlayerActivity.  They didn't provide any details in the response other than to say that the app wasn't respecting that button press, so I have no clue what I need to do to resubmit to their satisfaction.  Anyone else encounter this?

Also, it would be great to get that key added to the Remote app for testing on the ADT-1, especially if it is a usability requirement.

Help! I went to publish my Android TV app, and one of the things that wasn't clear anywhere in the documentation that I saw was the detail about which uses-feature item to include to differentiate between Android TV devices and regular phones and tablets.  I did finally find that, but in the interim, but in trying to set up the multiple APK settings, I accidentally create a version that requires API 21+, any screen size, and a microphone.  However, the APK set for that is strictly an Android TV build, but I'm afraid that as devices start upgrading to Lollipop, many phones are going to match that item and try to upgrade to a non-functional version of my app.  I just want to remove mistakenly uploaded APK, but since I clicked Publish, I cannot get it out of there.  I'm not seeing any easy fix, and I'm really worried about the potential impact for my users.  Is there anything I can do to clean this up?

Have any of you managed to properly set the recommendation background image?  I'm using the Notification.EXTRA_BACKGROUND_IMAGE_URI key with values that are reachable images, but I'm seeing the following from NotificationCardView: Invalid Content URI provided for recommendation background.  It is displaying the correct URL for the resource, so I know it is retrieving it from the notification correctly.  The only non-Google app I've found that seems to have gotten this to work is the Bloomberg app, which looks to be using a derivative of the RecommendationBuilder class in the leanback sample.  I even tried passing in their images (based on what I found in their logs) to rule out anything in my image itself, and even their won't load.
Wait while more posts are being loaded