bhdouglass / uappexplorer

Moved to GitLab
https://gitlab.com/bhdouglass/uappexplorer
GNU General Public License v3.0
42 stars 5 forks source link

Snappy packages should be filtered #24

Closed mzanetti closed 9 years ago

mzanetti commented 9 years ago

Ideally, uappexplorer.com would offer a selection to filter between phone (click) apps/scopes and ubuntu core (snappy) apps. If you intend to keep the website phone-only, snappy packages should be just filtered away.

popey commented 9 years ago

+1. Would be nice to have a toggle between [click | snap | all] which should probably default to 'click', and then later switch to snap when we finally migrate everyone over.

bhdouglass commented 9 years ago

I just added a new app type for snappy apps, by default they are hidden, unless you select them in the type dropdown.

@popey I'm not sure I follow you. Does the click api differentiate between click and snap packages? As far as I could tell it doesn't.

jamestait commented 9 years ago

The click package index doesn't differentiate between package types. It does filter packages based on what frameworks the client advertises in the X-Ubuntu-Frameworks header, though. I'm afraid I don't have a good suggestion as to how to translate that to a toggle like @popey is suggesting, other than to say that, right now, Snap packages target ubuntu-core-* frameworks, and Click packages target ubuntu-sdk-* frameworks.

bhdouglass commented 9 years ago

Thanks @jamestait, I can add a check for the framework to help differentiate them. Is it possible to get the frameworks of a user's devices so I can display "this app is compatible with your devices" sort of like Google Play does?

jamestait commented 9 years ago

There's nothing server-side that has that information, no. That's why we get the device to send it in a header for every search request. It allows the whole thing to be completely stateless. Maybe you could have "Device profiles" that users could select, mapping to frameworks that are typically installed?

mzanetti commented 9 years ago

Right. I've seen that in the webinterface for the Nokia store back in the days. They had a "select your device" thing which would allow you to pick one.

If someone connects to the store using the phone, preselecting that somehow using the browser's user agent might work. AFAIK that one contains "Ubuntu 14.10" etc.

bhdouglass commented 9 years ago

Is it possible to determine which frameworks are available from within an app? I could create an app-ified version that sends a list of frameworks to the api. Or is there a list somewhere that I could easily add device profiles?

jamestait commented 9 years ago

Not that I'm aware of. The Click Scope lists the .framework files in /usr/share/click/frameworks to create the list, but I don't think an app would have permissions to read that directory. I don't currently have a good answer to where device profiles should be added, but I'll ponder and see what I can come up with.

bhdouglass commented 9 years ago

Device profiles from the api would be great, until something like that, maybe I'll make a unconfined app through the open app store to read the frameworks (if it's not possible for a normal app).