Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get icon of installed apps on WebOS TV LG kotlin #412

Open
kun510 opened this issue Mar 29, 2024 · 19 comments
Open

Get icon of installed apps on WebOS TV LG kotlin #412

kun510 opened this issue Mar 29, 2024 · 19 comments

Comments

@kun510
Copy link

kun510 commented Mar 29, 2024

I'm making a sample about remote on LG TV using webOS with ConnectSDK. I can remote with some basic command, get the list of installed apps on the TV. The data of each item like this:
{"defaultWindowType":"card","requiredPermissions":["all"],"allowWidget":false,"uiRevision":1,"CPApp":false,"systemApp":true,"version":"1.0.0","enableBackgroundRun":true,"vendor":"LG Electronics, Inc.","enableCBSPolicy":false,"hasPromotion":false,"class":{"hidden":true},"tileSize":"normal","icon":"https://192.168.5.253:3001/resources/222fe81584d0dda9a0b9b7951e9206581c1409d9/AirPlay_Icon-77x77.png","lockable":true,"privilegedJail":false,"useCORSWhitelist":"cors_whitelist.json","checkUpdateOnLaunch":true,"transparent":true,"handlesRelaunch":false,"spinnerOnLaunch":true,"id":"airplay","unmovable":false,"inspectable":false,"mediaExtension":{"mse":{"enableSourceBufferFlush":true,"maxVideoSourceBuffer":150,"disableVideoIntrinsicSize":true,"enableServerSideTrick":true}},"inAppSetting":false,"trustLevel":"trusted","mediumLargeIcon":"AirPlay_Icon-115x115.png","title":"AirPlay","deeplinkingParams":"{"contentTarget" : "$CONTENTID"}","noSplashOnLaunch":true,"visible":false,"accessibility":{"supportsAudioGuidance":true},"folderPath":"/usr/palm/applications/airplay","networkStableTimeout":0,"main":"launch.html","removable":false,"type":"web","disableBackHistoryAPI":true,"installTime":0}
2024-03-29 13:57:47.123 9057-9057

With above data, I have url of icon: https://192.168.5.253:3001//resources//222fe81584d0dda9a0b9b7951e9206581c1409d9//AirPlay_Icon-77x77.png
But I can't get icon from this url
I can't find any document about this.
Can anyone help me?
Thanks a lot

@kun510 kun510 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2024
@kun510 kun510 reopened this Mar 29, 2024
@kun510 kun510 closed this as completed Mar 29, 2024
@kun510 kun510 reopened this Mar 29, 2024
@MuhammadAsad786
Copy link

any fix this issue about loading app icon in LG (webOs
)

@kun510
Copy link
Author

kun510 commented Apr 30, 2024

any fix this issue about loading app icon in LG (webOs )

What do you need, I fixed that

@MuhammadAsad786
Copy link

any fix this issue about loading app icon in LG (webOs )

What do you need, I fixed that

which url you to load for image , i use
https://ip:port/query/icon/appid
this link is working fine on Roku service but no working on WebOs service

@kun510
Copy link
Author

kun510 commented Apr 30, 2024

I changed the link of get Icon to ssap://com.webos.applicationManager/listLaunchPoints

@MuhammadAsad786
Copy link

MuhammadAsad786 commented Apr 30, 2024

I changed the link of get Icon to ssap://com.webos.applicationManager/listLaunchPoints

Can you provide me proper link
Because i think ssap not load from glide

@kun510
Copy link
Author

kun510 commented Apr 30, 2024

I have displayed it by passing the icon to the link ssap://com.webos.applicationManager/listLaunchPoints
Then I processed it using glide

@MuhammadAsad786
Copy link

I have displayed it by passing the icon to the link ssap://com.webos.applicationManager/listLaunchPoints
Then I processed it using glide

Ssap://com.webos.applicationManaget/appid

This link Right?

@kun510
Copy link
Author

kun510 commented Apr 30, 2024

I get the API from the link
ssap://com.webos.applicationManager/listLaunchPoints then I get the data and get the display icon from iconLink in ssap's Api json

@MuhammadAsad786
Copy link

when i get the applist throught launcher.getapplist(). this method give me list of apps. In applist i have id, name , raw variable ,

so how to create a url for app icon with these variable

@kun510
Copy link
Author

kun510 commented May 1, 2024

In raw there is data
{"defaultWindowType":"card","appsize":4696313,"CPAp":false,"systemApp":false,"version":"5.0.1","enableCBSPolicy":false,"vendor":"YuppTV" ,"hasPromotion":false,"tileSize":"normal","extraLargeIcon":"26145206897846570_16999277_192x192.png","largeIcon":"largeIcon.png","lockable":true,"transparent":false,"icon" :"https://192.168.5.253:3001/resources/4dabe31cfa8c527aed4135b5749a845833e2ae6f/icon.png","checkUpdateOnLaunch":true,"spinnerOnLaunch":true,"handlesRelaunch":false,"unmovable":false, "id":"yupptv","inspectable":false,"noSplashOnLaunch":false,"privilegedJail":false,"trustLevel":"default","mediumLargeIcon":"26145206880621944_16999277_115x115.png","splashBackground":"images /splash-screen.png","binId":465916,"title":"YuppTV","resolution":"1920x1080","visible":true,"deeplinkingParams":"","requiredEULA":"generalTerms ","inAppSetting":false,"accessibility":{"supportsAudioGuidance":false},"folderPath":"/media/cryptofs/apps/usr/palm/applications/yupptv","bgImage ":"images/LauncherBG.png","installTime":1625244800,"type":"web","main":"index.html","iconColor":"#17191c","disableBackHistoryAPI":true, "removable":true}
You just need to get the link from the icon, then put the link in trustManager, then pass it to glide and it will display

@chabelets
Copy link

chabelets commented May 22, 2024

Hey @kun510. I use Flutter and platform channel for connectSDK. I got the raw data and I got icon link that not working. I found this method in ConnectSDK, how should I use this?

WebOSTVService(null, null).getLaunchPoints(object : LaunchPointsListener {
                override fun onError(error: ServiceCommandError?) {
                    TODO("Not yet implemented")
                }
                override fun onSuccess("object": JSONArray?) {
                    TODO("Not yet implemented")
                }
            }
        )

@kun510
Copy link
Author

kun510 commented May 23, 2024

@chabelets
Use your device to call funcion launcher in ConnectableDevice's , then call funcion getLaunchPoints in WebOSTVService's and set the log.
sample :
deviceConnected?.launcher?.getLaunchPoints(object : Launcher.LaunchPointsListener {

             override fun onError(error: ServiceCommandError) {
                 Log.d("####", "onError: $error")
                 callback.onError(error,deviceConnected?.ipAddress ?: "", deviceConnected?.friendlyName ?: "")
             }

             override fun onSuccess(objectLG: JSONArray?) {
                 callback.onSuccess(objectLG, deviceConnected?.ipAddress ?: "", deviceConnected?.friendlyName ?: "")

             }
         })

@chabelets
Copy link

Thanks a lot. Works like a charm.

@chabelets Use your device to call funcion launcher in ConnectableDevice's , then call funcion getLaunchPoints in WebOSTVService's and set the log. sample : deviceConnected?.launcher?.getLaunchPoints(object : Launcher.LaunchPointsListener {

             override fun onError(error: ServiceCommandError) {
                 Log.d("####", "onError: $error")
                 callback.onError(error,deviceConnected?.ipAddress ?: "", deviceConnected?.friendlyName ?: "")
             }

             override fun onSuccess(objectLG: JSONArray?) {
                 callback.onSuccess(objectLG, deviceConnected?.ipAddress ?: "", deviceConnected?.friendlyName ?: "")

             }
         })

@chabelets
Copy link

Have you try get icon in iOS app, it seems ConnectSDK-iOS doesn't contain listLaunchPoints

@kun510
Copy link
Author

kun510 commented May 27, 2024

it's just like android

@kun510
Copy link
Author

kun510 commented May 27, 2024

Have you connected to fire tv yet?

@chabelets
Copy link

android

A can't find getLaunchPoints request in ConnectSDK-iOS, should I create this request manually?

Have you connected to fire tv yet?

No I haven't. I connected to WebOS for LG tv

@MuhammadAsad786
Copy link

Use the old version pod in ios , you will get the response id, name, icon .
Get the icon in the list to show

@kun510
Copy link
Author

kun510 commented May 27, 2024

@MuhammadAsad786 yes sure !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants