Re: New View Mode: docked

Hi Juliano,  

On Friday, May 11, 2012 at 5:23 PM, Moraes, Juliano (PSG IPO) wrote:

> Hi Guys,
>  
> My five cents about docked mode.
>  
> HP webOS has a concept called "Exhibition Mode" that is basically another view of the application when the device is docked.
> The way it works is the "Manifest" of the application allows the developer to set "dockMode": true|false and the app can use JavaScript to implement the behavior using the following way:
> AppAssistant.prototype.handleLaunch = function(params) {
> if (params) {
> if(params.dockMode){ //launch the touchstone theme}
> }
> }
>  
> I am not sure if this is the best approach. Perhaps if the developer could specify in the Manifest an alternative index.html to be used on dock mode would be better.
>  
> You can see more information in the following links:
> https://developer.palm.com/content/api/dev-guide/mojo/exhibition.html
> https://developer.palm.com/content/api/design/enyo/guidelines/system-features/exhibition-mode.html
> Facebook app exhibition mode: http://www.youtube.com/watch?v=0Qeet1g9LWc
>  
>  
> Android has the concept of "Car Mode" that can be used thought the API UiModeManager:
> http://developer.android.com/reference/android/app/UiModeManager.html
> It broadcasts an event that the app should handle for dock mode.
>  
> So, I agree with Charles that would be great to have a standard spec for this mode.
>  


I think what Charles is proposing is something like the following:  

opera.extensions.setBadge("some.html")

and then, some.html just needs to say:

<html>
<style>
@media (view-mode: badged){
     …  css magic...  
}
</style>

This has the advantage that you can use any mode or multiple modes per page:  

<html>
<style>
@media tv and (view-mode: badge){
… css magic...  
}

@media screen and (view-mode: minimized){
… css magic...
}


</style>


The advantage is that it all happens automagically without needing any additional APIs or declarations in the config.xml.  

Received on Friday, 11 May 2012 16:31:39 UTC