question

Alexander Martin avatar image
Alexander Martin asked

APL Pager issues

APL Pager issues:

- initialPage is not working on a real device [echo show 1st generation, software version: 622331120] (authoring tool works fine)

- SetPage command is not working during:

- the APL Pager is on another (none visible) page within a APL Pager

- the APL Pager is a child of a APL ScrollView/Sequence and not within the viewport

alexa skills kitalexaapl
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.

dancadana avatar image dancadana commented ·

Does SpeakItem command works with SetPage command?

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

Hi @Alexander Martin

For the initialPage issue, I just tried the APL document below both on the authoring tool and an Echo Show (first gen) device and it showed the second page as expected. If you're still seeing the issue, please share the APL document and device serial number for your device.

Thanks
Arun
@aruntalkstech

{
    "type": "APL",
    "version": "1.0",
    "mainTemplate": {
        "items": [
            {
              "type": "Pager",
              "width": "100%",
              "height": "100%",
              "navigation": "none",
              "initialPage": 1,
              "items": [
                {
                    "type": "Frame",
                    "backgroundColor": "red",
                    "item": {
                        "type": "Text",
                        "text": "Red"
                    }
                },
                {
                    "type": "Frame",
                    "backgroundColor": "green",
                    "item": {
                        "type": "Text",
                        "text": "Green"
                    }
                },
                {
                    "type": "Frame",
                    "backgroundColor": "blue",
                    "item": {
                        "type": "Text",
                        "text": "Blue"
                    }
                }
            ]
        }
        ]
    }
}
10 |5000

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

Arun@Amazon avatar image
Arun@Amazon answered

Hi @Alexander Martin

For the APL pager that is not visible on the viewport scenario, I tried the skill response below on an Echo Show (first gen). The document has a Pager under a giant Text block inside a ScrollView. I also sent a SetPage command and it correctly set the Pager to the last (index=2) item. Again, let me know i this doesn't work for you.

Thank you so much for helping us improve APL!

Arun
@aruntalkstech

{
    "directives": [
        {
            "type": "Alexa.Presentation.APL.RenderDocument",
            "token": "multiModalToken",
            "document": {
                "type": "APL",
                "version": "1.0",
                "mainTemplate": {
                    "items": [
                        {
                            "type": "ScrollView",
                            "height": "100%",
                            "width": "100%",
                            "item": {
                                "type": "Container",
                                "width": "100%",
                                "items": [
                                    {
                                        "type": "Text",
                                        "text": "This is a really really long piece of text.This is a really really long piece of text.This is a really really long piece of text. This is a really really long piece of textThis is a really really long piece of text This is a really really long piece of text. This is a really really long piece of text.This is a really really long piece of text.This is a really really long piece of text.This is a really really long piece of textThis is a really really long piece of textThis is a really really long piece of textThis is a really really long piece of textThis is a really really long piece of textThis is a really really long piece of textThis is a really really long piece of text.This is a really really long piece of textThis is a really really long piece of text"
                                    },
                                    {
                                        "type": "Pager",
                                        "id": "HiddenPager",
                                        "width": "100%",
                                        "height": "100vh",
                                        "navigation": "none",
                                        "items": [
                                            {
                                                "type": "Frame",
                                                "backgroundColor": "red",
                                                "item": {
                                                    "type": "Text",
                                                    "text": "Red"
                                                }
                                            },
                                            {
                                                "type": "Frame",
                                                "backgroundColor": "green",
                                                "item": {
                                                    "type": "Text",
                                                    "text": "Green"
                                                }
                                            },
                                            {
                                                "type": "Frame",
                                                "backgroundColor": "blue",
                                                "item": {
                                                    "type": "Text",
                                                    "text": "Blue"
                                                }
                                            }
                                        ]
                                    },
                                    {
                                        "type": "Text",
                                        "text": "This is a really really long piece of text. This is a really really long piece of textThis is a really really long piece of text This is a really really long piece of text. This is a really really long piece of text.This is a really really long piece of text.This is a really really long piece of text.This is a really really long piece of textThis is a really really long piece of textThis is a really really long piece of textThis is a really really long piece of textThis is a really really long piece of textThis is a really really long piece of textThis is a really really long piece of text.This is a really really long piece of textThis is a really really long piece of text"
                                    }
                                ]
                            }
                        }
                    ]
                }
            },
            "datasources": {
                "dummy": {
                    "foo": "bar"
                }
            }
        },
        {
            "type": "Alexa.Presentation.APL.ExecuteCommands",
            "token": "multiModalToken",
            "commands": [
                {
                    "type": "SetPage",
                    "componentId": "HiddenPager",
                    "value": "2"
                }
            ]
        }
    ]
}
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.

Alexander Martin avatar image Alexander Martin commented ·

Hi @Arun,

I'm back from vacation. I will soon check whether the problems still exist or not and will report.

Regards,

Alex

0 Likes 0 ·