Le 13/09/2013 23:51, Igor Leturia a écrit : > On Friday, September 13, 2013 11:13:38 PM UTC+2, Marco Chen wrote: >> Hi, >> In V1.1, there are some changes on the DeviceStorage API and that is in >> order to support internal/external storage. >> V1.1 introduced a new "navigator.getDeviceStorages(...)" which will return >> an array of device storages. >> And old one "navigator.getDeviceStorage()" will return a preferred storage >> or the first storage in volume list. >> I think your problem is related to this change. >> Sincerely yours. > Yes, seems very probable, thank you very much! > > Now, my problem is how to make the app compatible with both 1.0 and 1.1. If I > change the code to make it work in 1.1, it will no more work in 1.0. I guess > this is a general problem and that there is a solution to it, isn't there?
Like on the web :)
if (navigator.getDeviceStorages) {
// new code
} else {
// old code
}
(of course you can make it less spaghetti but you get the point)
> Another problem I have is how to test an app for 1.1, as the simulator is
> still in 1.0, as far as I know. Or is there some way to make the simulator
> behave like 1.1?
maybe B2G Desktop could work for you :
http://ftp.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-b2g18/
This is what the simulator is based on.
Based on what's written on MDN [1] the Firefox OS simulator should be
able to connect to a separate instance of B2G Desktop. Maybe Alexandre,
Myk or Paul could help more.
[1]
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Debugging/Setting_up#Enabling_debugging_on_the_Firefox_OS_Simulator
signature.asc
Description: OpenPGP digital signature
_______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
