Premise [download] Module: MiniBrowser - supports mulitple user-interfaces

Motorola Premise
I looked into this issue and there is a special META tag that is understood by Mobile Safari. Its purpose is to scale the web-page's content. The attached image shows what you need to add to Modules > MiniBrowser > GlobalScripts > MiniBrowserFunctions > gMBRenderHeaderEx.

For more information:
http://furbo.org/2007/07/24/one-line-of-code/
http://groups.google.com/group/iphonewebde...43493a828dffdb3
http://developer.apple.com/safari/library/...s/MetaTags.html

PS
I couldn't post the code as text because the forum's editor disallows the inclusion of certain HTML tags.
 

Attachments

  • iphone_tag.png
    iphone_tag.png
    10.4 KB · Views: 68
That would be it!!(i couldn't upload that line of code, either)
 
123,

Have you had a chance to update your Iphone browser interface since the last upload ?

I am surprised there is not more iPhone/iPad discussion going on the forum.

What is the best strategy for iPad inteface at this point. Your UI layout is optimized for the Iphone. Have you considered a separate version for the iPad.

Today I read about Remote Desktop apps for the iPad. I am seriously considering using Remote Desktop to give my iPAD full access to the original SYS Automation Browser. I have yet to test this options in terms of response time, wake-up time etc.

Would love to hear your thought on all this,

Patrik
 
I do not have any plans to enhance the iPhone UI (I don't own one). It was developed by Chuck and I incorporated it into the new MiniBrowser.

MiniBrowser's architecture is designed to handle mulitple user-interfaces. You can either modify the existing iPhone UI or add new ones. For example, the current URL for the iPhone UI is simply "http://servername/ip" but your new UIs could be "http://servername/ip4" or "http://servername/ipad".

Let us know how remote desktop fares with Automation Browser.
 
I'm interested in knowing how this (remote desktop) works also; although I don't own the ipad, iphone 4 etc... I finally have an android phone, but the ip page size is way to small for it; I'm wondering if I need to add the line of code and css mentioned above...
 
New Root Object
If you want to create a new user-interface, you'll need to create a new Root object in the Template folder. I don't know how to create one from within Builder. Here's the process and it is not for the faint of heart. You need to backup your configuration, export the MiniBrowser module as an XDO file, delete the MiniBrowser module, open the XDO with a text-editor, find the Templates section, copy and paste an existing Root object (i.e. like the ppc root object), change the new object's Name, replace the new object's ID using a new unique GUID (use: www.guidgen.com), save the XDO and then re-import it.
Here's what the ppc root object looks like in the MiniBrowser XDO:
<Object ID="{38DDEFB2-4FFC-4100-AAE1-067F0484895F}" Name="PocketPCRootObj" Class="sys://Schema/Modules/MiniBrowser/Classes/MiniBrowserRoot" DisplayName="Pocket PC Browser" Description="For Pocket PCs." UIName="ppc" UIWidth="240px" UIAdvanced="0" UIToolbarBackgroundColor="#006CC740" UIBackgroundColor="#006CC740" />
Enable "DefaultSite" and "SecureSite" if you wish to have both non-secure and secure access (HTTPS) to the new web site.

Important step for creating a New Root Object (like what I am doing for the Kindle). After you've gone through the gut-wrenching steps above, after the import step, you need to go to Modules->MiniBrowser->Macros->Installation->CreateAllWebRedirects then trigger it in the properties windows. This will create the new Web Direct ....
 
I've been working on the minibrowser and individual device control. From the mediazone, I am now picking up all associated devices and have started rendering based on what properties they contain. Television is working with a couple more funtions to go. A couple of style questions (and probably good coding practices).. I've created the devices as independent functions (I pick up the device type and generate a page for it eg mbRenderPageTelevision; mbRenderPageCablebox and so on. Right now, I am including them under the minibrowser mediazone class - right approach? Or should they be outside of the minibrowser mediazone class? For the UI, am considering just going with standard functions (on/off, source, etc). Faster for me, but prob not as elegant...I'm looking at just picking up what is in the device custom folders...

On the mbCreateResponse function (btw 123, this is just brilliant, especially now that I understand it!!). I could build cases for each device, but how can I manipulate the response based on the device (looking to see what is more efficient)

Thoughts?

(the real problem for me is some of you guys have set the bar extremely high!)
 
Nice fix! Apparently android's browser needs the same meta tag... Thanks! And to think one line of code changes the user interface so much!

I'm curious if anyone has added more device specific control to this module yet? Is 123 still developing this world-class module?

Some device functions I think that would be great to have:

1. Security functions
2. PVR, AV Receiver and TV functions

Also, is there a way to embed the username and password into a URL that points to the home screen? I don't like having to type the username and password initially on my phone... :(

I looked into this issue and there is a special META tag that is understood by Mobile Safari. Its purpose is to scale the web-page's content. The attached image shows what you need to add to Modules > MiniBrowser > GlobalScripts > MiniBrowserFunctions > gMBRenderHeaderEx.

For more information:
http://furbo.org/2007/07/24/one-line-of-code/
http://groups.google.com/group/iphonewebde...43493a828dffdb3
http://developer.apple.com/safari/library/...s/MetaTags.html

PS
I couldn't post the code as text because the forum's editor disallows the inclusion of certain HTML tags.
 
A minor html formatting issue for the status page? It appears that the font tags are outside of the a href tags... I'm not sure if this is ok or not?

This site claims that the font tags should be inside the a href tags...
http://www.chami.com/tips/internet/052298I.html

At any rate, I was having a font color issue under android where some links under the status page were black (e.g. the links for each object), even though they should have been in color!?! Under XP, ie and firefox were both smart enough to interpret the link color correctly. I moved the font tags for the object names and all is well under android, ie and firefox so this may be worth correcting in a future version.

EDIT: The buttons at the top of the page do the same thing. I probably won't change them though as I like them black anyways...

Here's an example of the code I changed:

Code:
sRowObject = "<TR><TD width=75% align=left>&nbsp;" & sTextFont
sRowObjectMid = "</FONT></TD><TD width=25% align=left>" & sTextFont
sRowObjectEnd = "</FONT></TD></TR>"

BECOMES:
Code:
sRowObject = "<TR><TD width=75% align=left>&nbsp;"
sRowObjectMid = "</TD><TD width=25% align=left>" & sTextFont
sRowObjectEnd = "</FONT></TD></TR>"


Code:
method.sHTML = method.sHTML & (sRowObject & sLink & oItem.ObjectID & sLinkMid & oItem.Name & sLinkEnd & sRowObjectMid)

Becomes:
Code:
method.sHTML = method.sHTML & (sRowObject & sLink & sTextFont & oItem.Name & "</FONT>" & sLinkMid & oItem.Name & sLinkEnd & sRowObjectMid)

Code:
sTemp = sTemp & "<BR>" & sTemperatureMode & "<BR>(" & sHeatingStatus & ")</FONT>"

Becomes:
Code:
sTemp = sTemp & "<BR>" & sTemperatureMode & "<BR>(" & sHeatingStatus & ")"

(Extra /FONT tag?)
 
So you have minibrowser working on an Android tablet? It's not kicking off multiple web sessions?
 
I'm using xb, 123's module with the modifications noted in this forum. No multiple sessions... I think?!?

I want to make sure I understand what you're saying:
Are you saying that if you are home, then click a room, a new session is created under "WebServer.Sites.Defualt_Web_Sites.Session" for each click?

This doesn't appear to be happening to me. However, I'm running android 2.3 and I'm using a custom application I made. The custom application creates a webview in full screen mode with no bars at the top! It also does appearance related things like disable the scroll bars and disables multi-touch.

If you access the xb page from your PC does it create multiple sessions too?

Everything is loading on 3G, far exceeding my expectations! The app stores my username and password internally, so all I have to do is open it. It's not ready for release yet as I need to learn how to build a menu system, thus my username and password are hard-coded. If you want to compile your own version, I can post my source and you'd need to add your host name, user name and password. I need to clean up the code first.

So you have minibrowser working on an Android tablet? It's not kicking off multiple web sessions?
 

Attachments

  • singlleSession.JPG
    singlleSession.JPG
    11.6 KB · Views: 0
FYI: I think I'm going to use ppc in my app instead of xb. I think the layout of a pocket pc is most like an android phone.
 
Of course, I got rid of my Android tablet. I think. Who knows? It may be in the pos with the rest of my junk.

Yes. When I kicked off a session, it created a number of sessions. I think that was Android 2.0? 2.1? So maybe its improved?

And it only did it from the tablet - I never experienced it on a PC, Windows Mobile, or Windows Phone 7.

Maybe it's time to get another Android tablet....
 
Back
Top