Nice idea. So, when we decide to remove this in the future (when Adobe hopefully fixes this bug) will the users get a compilation error if they are using this include?
Thanks, Om On Aug 11, 2014 11:42 PM, "Alex Harui" <[email protected]> wrote: > Maybe, but that would bake that code in and that wouldn't be fun to carry > more overrides as time goes on. > > My first thought was to use Mixins. > > Create an mx_internal String in MQP.as called versionOverride. If not > null, use that instead of Capabilities.version. > > Create a class called Android4_1MediaQueryOverride.as (or something like > that). It will use [Mixin] metadata and on its init() method it will > inject the appropriate string into the versionOverride variable in MQP.as. > > Mustella uses this pattern. See LocalHost8080.as in mustella/as3 > > The developer just adds the -includes=Android4_1MediaQueryOverride option > to MXMLC. > > -Alex > > > On 8/11/14 11:16 PM, "OmPrakash Muppirala" <[email protected]> wrote: > > >You mean something like MediaQueryParser.simulateAndroid4() that you can > >call in Application.initialize() ? > > > > > > > >On Mon, Aug 11, 2014 at 11:12 PM, Alex Harui <[email protected]> wrote: > > > >> IMO, instead of hacking in a "fix", it might be better to hack in the > >> ability to override what Capabilities.version returns for the > >> MediaQueryParser. Then you can inject just about anything during > >>testing. > >> > >> -Alex > >> > >> On 8/11/14 11:03 PM, "OmPrakash Muppirala" <[email protected]> > wrote: > >> > >> >On my Samsung Galaxy 3 phone, the Capabilities.version is reported as > >>"AND > >> >14,0,0,124" > >> > > >> >AIR simulator, when simulating an iPad reports Capabilties.version as: > >> >"IOS > >> >14,0,0,124" > >> >AIR simulator, when simulating an Android phone reports > >> >Capabilties.version > >> >as: "4.1 14,0,0,124" > >> > > >> >This seems like an obvious bug with the AIR simulator. > >> > > >> >I can report a bug with the AIR team, but any objections if I hack in a > >> >fix > >> >in the Flex SDK so that we dont have to wait until they fix this bug? > >> > > >> >Thanks, > >> >Om > >> > > >> > > >> > > >> >On Mon, Aug 11, 2014 at 8:40 PM, OmPrakash Muppirala > >> ><[email protected]> > >> >wrote: > >> > > >> >> > >> >> Check the MediaQueryParser.as to see what Capabilities it is looking > >> >>for > >> >> and how it parses them. I'm surprised the version string only says > >> >>"4.1" > >> >> > >> >> On 8/11/14 12:25 PM, "OmPrakash Muppirala" <[email protected]> > >> wrote: > >> >> > >> >> >On the Air simulator, Capabilities.os say: "Windows 7" > >> >> >What is weird is that Capabilities.version says "4.1" I am assuming > >> >>it is > >> >> >for Android 4.1. > >> >> > > >> >> >Also, Capabilities.playerType says: "Desktop" > >> >> > > >> >> >So, the question now is, if I detect version=4.1 and > >> >>playerType="Desktop", > >> >> >can I assume that it is the AIR simulator simulating Android 4.x? > >> >> > > >> >> >I can make this change in MediaQueryParser.as if no one has > >>objections. > >> >> > > >> >> >Again, the goal here is to ensure that the CSSMedia queries > >>os-platform > >> >> >and > >> >> >os-version works so that we can show the correct CSS styles in the > >>AIR > >> >> >simulator. > >> >> > > >> >> >For the record, everything works as expected on the device. > >> >> > > >> >> >Thanks, > >> >> >Om > >> >> > > >> >> > > >> >> >On Mon, Aug 11, 2014 at 10:15 AM, Alex Harui <[email protected]> > >>wrote: > >> >> > > >> >> >> I don't know how this works. > >> >> >> > >> >> >> What does the Capabilities.os string say for the simulator? I'm > >> >> >>wondering > >> >> >> if it leverages the Android SDK somehow. > >> >> >> > >> >> >> -Alex > >> >> >> > >> >> >> On 8/11/14 10:09 AM, "OmPrakash Muppirala" <[email protected]> > >> >> wrote: > >> >> >> > >> >> >> >Bump... > >> >> >> > > >> >> >> >Anyone has any ideas? > >> >> >> > > >> >> >> >My only other option would be to ask folks to manually include > >>the > >> >> >> >android4.css file in their apps. This will ensure that the skins > >> >>show > >> >> >>up > >> >> >> >fine in the AIR simulator. > >> >> >> > > >> >> >> >Is that approach okay for folks? > >> >> >> > > >> >> >> >Thanks, > >> >> >> >Om > >> >> >> >On Aug 9, 2014 11:20 PM, "OmPrakash Muppirala" > >> >><[email protected]> > >> >> >> >wrote: > >> >> >> > > >> >> >> >> Looking at how Mustella is running the tests. It seems like > >>the > >> >> >> >>variable > >> >> >> >> target_os_name can be set to "android". How exactly does this > >> >>work? > >> >> >> >>Can > >> >> >> >> I also pass an os version? > >> >> >> >> > >> >> >> >> Thanks, > >> >> >> >> Om > >> >> >> >> > >> >> >> >> > >> >> >> >> On Sat, Aug 9, 2014 at 10:45 PM, OmPrakash Muppirala > >> >> >> >><[email protected] > >> >> >> >> > wrote: > >> >> >> >> > >> >> >> >>> I am using Maurice's os-platform and os-version CSS media > >> >>queries to > >> >> >> >>> implement the new Android 4.x skins via css. Does anyone know > >> >>how > >> >> >>to > >> >> >> >>> customize Flash Builder's AIR simulator to report a particular > >> >>os, > >> >> >>os > >> >> >> >>> version? > >> >> >> >>> > >> >> >> >>> As I am trying this out, it seems like a big problem that you > >> >>can't > >> >> >>see > >> >> >> >>> the correct skins in your AIR simulator. > >> >> >> >>> > >> >> >> >>> Anything that I can set in the -app.xml file? > >> >> >> >>> > >> >> >> >>> Thanks, > >> >> >> >>> Om > >> >> >> >>> > >> >> >> >> > >> >> >> >> > >> >> >> > >> >> >> > >> >> > >> >> > >> > >> > >
