Chrome for Android, and packaging as an android app.

Q&A about the latest versions
Post Reply
manxjon
Posts: 22
Joined: Fri Nov 19, 2010 3:41 pm

Two kind of related questions.
1. Will the development team release code to do provide an HTML5 / WebGL export to 'Chrome for Android' when it is launched soon, (no flash player in that browser, due to Adobe halting mobile flash dev), I am expecting this to become the browser of choice for Android going forward and I need to ensure that I can target Android devices.

2. Has any one experience / managed to use 'phone gap' to package a native app with panaoramas, I am guessing that the safari code will compile for iOS devices, but a what if any options are there for packaging an HTML5 panorama for Android?
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

For those who are curious about Chrome and Android [btw both are Google]

http://androidcommunity.com/chrome-for- ... -20120220/

"Given that it’s a beta product and only available on ICS, we’re really happy where it is. I think most people haven’t experienced it on tablets. They will discover a lot of good things there as well."

In the mean time

Our HTC Evo 4g 'Design' similar to Hero S [Released Oct-Nov 2011] Android 2.3.4 uses WebKit/533.1 for a browser.
I understand from others that Webkit/533.1 is open source Apple. AND
with this browser we are using Adobe Flash player version 11.1.111.6 obtained by visiting Android Market App.

Our HTC Evo 4g smart phone and along with alot of other similar phones are scheduled for Android 4 [ICS ice cream] firmware update in about 5 months.

Our smartphone displays Flash panoramas loads fast and rotates smoothy. It does not play well with HTML5/CSS3 [for apple devices].
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
manxjon
Posts: 22
Joined: Fri Nov 19, 2010 3:41 pm

Thanks for the respose, but it does not answer either of my questions, so is not as helpful as I would have hoped.

I understand that Chrome for Android is in beta and only supported on ICS, however as I have ICS on both my Tablet and Phone and 5 months is hardly a long time I need to know what if any plans there are for supporting it for my clients in the future if or when I am asked.

My main issue right now is that I have been asked if I can package some panos into an app being built with phone gap, and obviously only having code that supports iOS is losing a substantial and fasted growing piece of the market.
BHiggins
Posts: 13
Joined: Thu Feb 02, 2012 11:41 am

manxjon wrote:Two kind of related questions.
1. Will the development team release code to do provide an HTML5 / WebGL export to 'Chrome for Android' when it is launched soon, (no flash player in that browser, due to Adobe halting mobile flash dev), I am expecting this to become the browser of choice for Android going forward and I need to ensure that I can target Android devices.

2. Has any one experience / managed to use 'phone gap' to package a native app with panaoramas, I am guessing that the safari code will compile for iOS devices, but a what if any options are there for packaging an HTML5 panorama for Android?
This may not answer you questions but i thought I would share what I am doing with Android for those that are struggling with it as I did for a while. I have done quite a bit of testing on android 2.3.3 and android 4.0.3 with default browser/flash, firefox&firefox beta, and chrome beta. Chrome beta is sweet for the html5 solution. I have read plenty of speculation on chrome becoming the default browser and hope that it does because the android default browser is weak and currently does not support webGL which is what the pano2VR html5 solution needs to work in chrome and firefox. (Safari is still utilizing css3 3D transforms)

In order to properly get your android device to display the panos a couple of pointers. the skin renders just fine in flash as long as you have the following in your header:

Code: Select all

<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
Without that particularly on the high screen density devices (droid for example), the buttons were so small that they were unusable. then I went down the path of a separate skin for android, etc... but that was all unnecessary once I placed that in the header. the pano2vr software will place that automatically if you output for html5. I am using .net so I was using server side code to place that in for iPad, iPhone, and iPod only which is why I had difficulty getting the android to work.

The same can be said for the html5 skins as well in regards to scaling on the android devices etc..

If you have to have separate builds for android devices then you will need to test the user agent using either server side code (.net(asp), php, etc) or client side code (javascript). I am using server side code to deliver different sets of code for the different devices I am delivering to. For example (.net):

Code: Select all

if ((HttpContext.Current.Request.UserAgent.ToLower.Contains("iphone") and not HttpContext.Current.Request.UserAgent.ToLower.Contains("ipad")) or (HttpContext.Current.Request.UserAgent.ToLower.Contains("ipod") and not HttpContext.Current.Request.UserAgent.ToLower.Contains("ipad")) or (HttpContext.Current.Request.UserAgent.ToLower.Contains("android") and HttpContext.Current.Request.UserAgent.ToLower.Contains("mobile"))  or (HttpContext.Current.Request.UserAgent.ToLower.Contains("android") and HttpContext.Current.Request.UserAgent.ToLower.Contains("firefox")) )then

    'My device is a mobile android or a mobile iOS device

else if(HttpContext.Current.Request.UserAgent.ToLower.Contains("ipad") or (HttpContext.Current.Request.UserAgent.ToLower.Contains("android")))then

    'My device is a tablet of either the iOS or android flavor

else

    ' This is either a desktop computer or an unknown and untested device

end if

A brief explanation of the above code.

(HttpContext.Current.Request.UserAgent.ToLower.Contains("iphone") and not HttpContext.Current.Request.UserAgent.ToLower.Contains("ipad")) is necessary because the Facebook app on the iPad has a user agent that has both iPhone and iPad in it (which is frustrating)

(HttpContext.Current.Request.UserAgent.ToLower.Contains("android") and HttpContext.Current.Request.UserAgent.ToLower.Contains("mobile")) will identify a non tablet android device (a phone or similarly sized device)

(HttpContext.Current.Request.UserAgent.ToLower.Contains("android") and HttpContext.Current.Request.UserAgent.ToLower.Contains("firefox")) is problematic because right now the firefox browser on the androids does not have mobile in the user agent, so it gives the same user agent for both phones and tablets which is frustrating. firefox beta has fixed this anomaly, so once firefox beta becomes the default browser for firefox, then that statement will be taken out and a test for android and mobile will satisfy.

HttpContext.Current.Request.UserAgent.ToLower.Contains("ipad") or (HttpContext.Current.Request.UserAgent.ToLower.Contains("android")) works for tablets because the first test eliminated the mobile devices (of course firefox right now does not pass this).

Anyway, this is what I have been doing for the android.

As far as testing goes, I have a droid phone with Android 2.3.3, and an Asus Transformer Prime tablet with Android 4.0.3.

The panos work very well in my opinion both devices. firefox is ok, not great. One problem is the url bar does not work the same as the iOS devices, so the scroll(0,1) javascript command does not seem to work for me, but if you manually scroll it goes away and stays away. The other big problem in firefox is when you rotate the orientation. The pano nearly disappears completely. The only way I can get it to render properly afterwards is to reload. My guess is that this a browser problem and not a pano2VR problem(It works fine on the tablet) This is true for both firefox and firefox beta. The flash panos work well in the android default browser.

The tablet renders both flash and html5 really well. The html5 only works in the firefox, firefox beta and chrome beta browsers. It is a big disappointment that the android browser is not up to speed with webGL, but hopefully chrome will become the default.

I agree that Android is quickly gaining market share and has to included in any mobile solutions. The frustrating thing about Android is the multiple platforms that it is on..... It is a lot easier with iOS in that regard. (and I love apple products)


Hope that this helps.

Burley
Post Reply