question

james andresakis avatar image
james andresakis asked

Fire TV stopped showing all recommendations from app

Hello all,

I had recommendations working on firetv and a firetv stick both of which seemed to work fine. After I added amazon specific extras the recommendations on both devices seem to be broken. I have read and re-read all the documentation on how to set up and post to the test recommendation row which does not seem to work either.

The only amazon extra I am using is com.amazon.extra.DISPLAY_NAME.

removing the extra and putting it back does not make any difference. I have reseted and rebooted, waited, navigated around, and tried a few other command line options from adb on trying to remove the cached info from the device none of which seems to work. It seems that the recommendations on these fire tv devices breaks after attempting so many times.

Is there anything I can do to force the test row to show up? Like I mentioned above I have tried all the suggested things mentioned in the documentation none of which work at all. I would rather not have to factory reset these devices.

Any help on the matter would be greatly appreciated.

fire tvandroid
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Levon@Amazon avatar image
Levon@Amazon answered

Hi James,

Could you please remove your recommendations and try with other apps, which send recommendations in ReYA row.

Steps:
  1. Install Red Bull, TED and Fan Tv apps.
  2. Open and play a video in each.
  3. Come back to home screen. Navigate to other tab (Your video).
  4. Check if REYA row is showing with recommendations from these apps.
2 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

james andresakis avatar image james andresakis commented ·

Hi Levon and thanks for replying. I tried downloading the red bull app which did not seem to put any recommendations in the list. I reset the device and increased the number of notifications to 20 and finally it seems to work. Is there anything that would keep notifications from showing in that row? Im thinking maybe some of the images I was feeding to the recommendations may have been to large possibly.

0 Likes 0 ·
Levon@Amazon avatar image Levon@Amazon ♦ commented ·

Hi James,

There could be multiple reasons why notifications were not shown.

  1. Minimum number of notifications for ReYa row to be shown are 5, and for developer test row are 3.
  2. For developer row to work, you need to first set the package name and then reboot the device to take effect.

Images in general would not break the recommendations, although images will get dropped if not within the size limits.

There may be other reasons for which we would need the logs of the issue to investigate. Thanks!

0 Likes 0 ·
Levon@Amazon avatar image
Levon@Amazon answered

Hi James,

Thanks for posting! Could you please provide snippets of code and configuration, so we could investigate. Thanks!

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

james andresakis avatar image
james andresakis answered
This is the logic I am using that works fine on normal android tv. This logic is run from a jobscheduler service and also from a broadcast receiver. The behavior observed on firetv is that after the initial run and posting of notifications, no more can be posted and the app no longer can add notifications even though in the log output they are being created successfully using this logic. It seems to be an oddity with firetv OS and some kind of hard limit to prevent notification spam is my guess. An override for testing purposes would be much appreciated. Even waiting 5 to 7 minutes to see if your notifications made it into the system is to long fwiw.
if(bitmap != null)
                                    {
                                        ContentRecommendation.Builder builder = new ContentRecommendation.Builder();builder.setIdTag(getId())
                                                .setAutoDismiss(true)
                                                .setTitle(getTitle())
                                                .setBadgeIcon(R.drawable.recommendations_small_icon)
                                                .setColor(ContextCompat.getColor(getApplicationContext(), R.color.notificationcolor))
                                                .setBackgroundImageUri(RecommendationProvider.CONTENT_URI + item.getId())
                                                .setStatus(ContentRecommendation.CONTENT_STATUS_AVAILABLE)
                                                .setContentTypes(new String[]{ContentRecommendation.CONTENT_TYPE_MOVIE})
                                                .setContentImage(bitmap)
                                                .setContentIntentData(ContentRecommendation.INTENT_TYPE_ACTIVITY,buildPendingIntent(item.getId(), item.getContentType()), 0, null);ContentRecommendation rec = builder.build();Notification notification = rec.getNotificationObject(ContextUtil.getApplicationContext());//                                        notification.extras.putString("com.amazon.extra.DISPLAY_NAME", "my app");                                        try{
                                            notificationManager.notify(item.getId(), item.getId().hashCode(), notification);
Logout.d("recommendation added", item.getTitle() + " added. bitmap height "  + bitmap.getHeight());}
                                        catch (RuntimeException ex)
                                        {

}

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

james andresakis avatar image james andresakis commented ·

Using this logic I can see at least 10 notifications being added but they never show. Even going through all the steps suggested in the documentation do nothing to make the notifications show.

0 Likes 0 ·