Closed Bug 1221345 Opened 9 years ago Closed 9 years ago

Marketplace should disable Install buttons for incompatible phones

Categories

(Marketplace Graveyard :: Consumer Pages, defect, P2)

Avenir
defect

Tracking

(Not tracked)

VERIFIED FIXED
2015-11-24

People

(Reporter: bwalker, Assigned: mat)

References

Details

Marketplace enables install buttons for all mobile browser visitors, even though most of them won't be able to run OpenMobile apps. Even though User-Agent filtering is brittle, it would be better to do some basic User Agent filtering to disable install buttons for Firefox OS 1.X visitors.
Going to try to avoid UA detection for this and solve the problem for features requirements in general, not just OpenMobile.

The idea is to:
1) Have the API return a boolean indicating feature profile compatibility information when returning an app (probably going to care about detail API only for now, since in most cases search would not return incompatible apps anyway)
2) Using that boolean in the frontend to disable the install button

We only need a boolean since the API receives the feature profile string, and has access to all features required by the app. This avoids having to implement feature profile decoding on the client.
Assignee: nobody → mpillard
Priority: -- → P2
Target Milestone: --- → 2015-11-17
Summary: Marketplace should disable OpenMobile Install buttons for incompatible phones → Marketplace should disable Install buttons for incompatible phones
Blocks: 1202054
Mat: I'm a little confused on this. If we're able to verify according to the profile string, then the button's state will reflect true compatibility (as much as we could tell in the app as well). So on FxOS isn't there no need to prompt the user to go to the same page in the app?
Flags: needinfo?(mpillard)
No, in the browser we do not send the correct profile string (we can't detect anything), we send the default one.
Flags: needinfo?(mpillard)
Carrying block from bug 1202054
Blocks: 1223121
Fixed in https://github.com/mozilla/fireplace/commit/12977c0d66a7ac3dbc1ec033a4b4148e8eb510ce , this is now on dev.

QA:

Sorry it's super long and repetitive, it's a complicated one.

Make sure *not* to force add-ons enabling in debug page for this.

Make 3 apps. I suggest submitting new apps with clear slugs and names to not mix them up:
- One using no special feature requirements
- One using the "512 MB Memory" feature requirement
- One using the "OpenMobile ACL" feature requirement (it's hidden by default, need to be an admin to see it in devhub)

Also submit one add-on, and make all those apps and the add-on public. Then:

Using a 2.1 phone:
- Run with your phone connected to your computer:
- adb shell setprop persist.acl.version ";P172R12"
- Check that the string is there by doing adb shell getprop persist.acl.version

- Go to the detail page for the non-special app in your Firefox OS *Browser*. It should be installable.
- Go to the detail page for the non-special app in your Firefox OS *Marketplace App*. It should be installable.

- Go to the detail page for the app using 512 MB Memory feature in your Firefox OS *Browser*. It should *not* be installable (can't detect feature from the browser).
- Go to the detail page for the app using 512 MB Memory feature in your Firefox OS *Marketplace App*. It should be installable.

- Go to the detail page for the app using OpenMobile ACL feature in your Firefox OS *Browser*. It should *not* be installable (can't detect feature from the browser).
- Go to the detail page for the app using OpenMobile ACL feature in your Firefox OS *Marketplace App*. It should be installable.

- Go to the detail page for the add-on in your Firefox OS *Browser*. It should *not* be installable (can't detect feature from the browser).
- Add-ons should not appear in Marketplace App at all so there is no additional step to check if the add-on is installable from the app.

Using a 2.5 phone:
- Make sure the persist.acl.version from above is not set. If it is, reset it to some random string.

- Go to the detail page for the non-special app in your Firefox OS *Browser*. It should be installable.
- Go to the detail page for the non-special app in your Firefox OS *Marketplace App*. It should be installable.

- Go to the detail page for the app using 512 MB Memory feature in your Firefox OS *Browser*. It should *not* be installable (can't detect feature from the browser).
- Go to the detail page for the app using 512 MB Memory feature in your Firefox OS *Marketplace App*. It should be installable.

- Go to the detail page for the app using OpenMobile ACL feature in your Firefox OS *Browser*. It should *not* be installable (can't detect feature from the browser).
- Go to the detail page for the app using OpenMobile ACL feature in your Firefox OS *Marketplace App*. It should *not* be installable (feature is absent).

- Go to the detail page for the add-on in your Firefox OS *Browser*. It should *not* be installable (can't detect feature from the browser).
- Go to the detail page for the add-on in your Firefox OS *Marketplace App*. It should be installable.

Thanks.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
2.1 phone:
- Run with your phone connected to your computer:
- adb shell setprop persist.acl.version ";P172R12"
- Check that the string is there by doing adb shell getprop persist.acl.version
---> done

A)I've created these three apps: http://screencast.com/t/tVlN426z 
->In the FF OS *Browser* is displayed and installable ONLY the non-special app: http://screencast.com/t/ZL0e3X2s (the other apps are not listed at all)
->In the FF OS *Marketplace App* are displayed and installable the non-special app and the app using OpenMobile ACL feature: http://screencast.com/t/kfvnXeESX 
->The app using 512 MB Memory feature is *not* displayed in both FF OS Browser and MP-app.

B)I've created the addon: http://screencast.com/t/Nm1VpPEo3
->In the FF OS *Browser* the addon is *not* installable: http://screencast.com/t/DGyTymKD


2.5 phone:
- Make sure the persist.acl.version from above is not set. If it is, reset it to some random string.
---> done

A)
-> In the FF OS *Browser* is available and installable ONLY the non-special app (the other apps are not listed at all)
-> In the FF OS *Marketplace App* are displayed and installable the non-special app, the app using 512 MB Memory feature and the app using OpenMobile ACL feature.

B)
-> In the FF OS *Browser* the add-on is *not* installable.
-> In the FF OS *Marketplace App* the add-on is installable.

Are these the expected results?
Flags: needinfo?(mpillard)
We discussed this over IRC.

Valentina's 2.1 phone was set to report 319Mb of RAM, explaining issue A), and the 2.5 phone was set to have OpenMobile ACL present (the string need to be set to an empty value, not just any random value, my fault).

Once that was solved, one issue remained: it seems that in a browser, we don't send the default feature profile, so we report feature compatibility as unknown (null) and don't act on it in buttons code.
Status: RESOLVED → REOPENED
Flags: needinfo?(mpillard)
Resolution: FIXED → ---
Last bit fixed in https://github.com/mozilla/fireplace/commit/be74d22c73e92326c18fbf6b8d687230cd27e877
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Target Milestone: 2015-11-17 → 2015-11-24
Verified as fixed on MP-dev FF OS 2.1 and 2.5 - Flame

2.1 device:
-> Firefox OS *Browser* : non-special app - installable (http://screencast.com/t/pNUlOOyy), app using 512 MB Memory feature - not installable (http://screencast.com/t/nqGDoi6Up), app using OpenMobile ACL feature - not installable (http://screencast.com/t/ggBA4RUys5), add-on - not installable (http://screencast.com/t/zD0IuCnjDM3)
-> FF OS *Marketplace App*: non-special app, app using 512 MB Memory feature and app using OpenMobile ACL feature - installable (http://screencast.com/t/FuMLMoOm)


2.5 device:
-> Firefox OS *Browser* : non-special app - installable (http://screencast.com/t/zu5rAQQiglD), app using 512 MB Memory feature - not installable (http://screencast.com/t/jmWcAdWpKc) and app using OpenMobile ACL feature - not installable (http://screencast.com/t/yP1cFiXAaXWE), add-on - not installable (http://screencast.com/t/e2LO5hC3B)
-> FF OS *Marketplace App*: non-special app, app using 512 MB Memory feature and add-on - installable (http://screencast.com/t/NDYnz4Un6AVl, http://screencast.com/t/v2f4vjKvBTr) and app using OpenMobile ACL feature - not displayed.

Closing issue.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.