You are not logged in.

milotimbol

Intermediate

  • "milotimbol" started this thread

Posts: 220

Location: Philippines

Occupation: Software Developer

  • Send private message

1

Sunday, July 29th 2018, 2:24pm

krpano in android app via phonegap card board mode issue

I was able to put a krpano tour inside an anrdoid app via phone gap. I followed this tutorial by Tony Redhead

https://tonyredhead.com/phonegap-build/offline-tours-android

It's working pretty well, except for cardboard mode. Please see video

https://www.youtube.com/watch?v=3HJiWrbp-ZE

When I switch to cardboard mode, its too zoomed in. If I open the same tour in android chrome browser and switch to cardboard mode it works fine.

Any ideas why this is happening and How do I fix this?

reza_shnia

Trainee

Posts: 75

Occupation: krpano freelancer || creating ideas & coding them || krpano developer

  • Send private message

2

Sunday, July 29th 2018, 6:39pm

Hi
in my experience, this happens when I use bad "viewport" in my HTML code.
try this viewport :

Source code

1
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui" />

andrew22222

Intermediate

Posts: 341

Location: Australia

  • Send private message

3

Sunday, July 29th 2018, 10:06pm

Hi Milo,

Thanks for posting the link to the Android app tutorial using Phonegap. I had no idea that was available and a really good read. There still might be hope for paid virtual tours as the whole 360 tours concept seems to have gone a little stale in the market. Shame really as you want to just keep making them but not for free ;-)

I did notice in the tutorial that during the phonegap signup there were three options for max app size. 50mb, 100mb or the 1gb included with the cloud membership. My question is, is it possible to create an app with all the basic working structure but then download any additional content such as more scene tiles, movie clips, sound files, html popup content etc. via an internet connection with those files hosted on a server? Some of my older tours are massive and would quite easily go over the 1gb limit.


I've noticed that many apps make you install the basic setup to get things rolling but then you are prompted to download any additional content in order to view it so they can keep the original app size down to a minim for the install.


Cheers,


Andrew

milotimbol

Intermediate

  • "milotimbol" started this thread

Posts: 220

Location: Philippines

Occupation: Software Developer

  • Send private message

4

Monday, July 30th 2018, 7:54am

Hi Reza, tried your viewport code. It did fix the zoom issue for cardboard but the buttons are now very small. See video below.

https://www.youtube.com/watch?v=tk5K4xOIskM

Any ideas how I can keep the button sizes as before but have cardboard mode working ?

andrew22222 - There's probably a way to do that but I havent tried it yet. You can actually build your own phone gap apk from your desktop without the limits (i think). The cloud one is a paid service but if you can set it up on your desktop there's no set file size limits but this is more for a developer. Will try it out one of these days will let you know how it goes.

reza_shnia

Trainee

Posts: 75

Occupation: krpano freelancer || creating ideas & coding them || krpano developer

  • Send private message

5

Monday, July 30th 2018, 3:19pm

Hi Milo,

you are using which version of krpano?


use this viewport :

Source code

1
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,viewport-fit=cover"/>


and use this code in your XML :

Source code

1
<krpano stagescale="calc:stagescale * 2" if="stagescale LT 1.0" devices="mobile" />

milotimbol

Intermediate

  • "milotimbol" started this thread

Posts: 220

Location: Philippines

Occupation: Software Developer

  • Send private message

6

Wednesday, August 1st 2018, 2:41pm

Im using krpano-1.19-pr16 . Actually I'm just using the files generated from the droplet. It works fine in a browser. My problem is when I put it inside phone gap following the tutorial from. - https://tonyredhead.com/phonegap-build/offline-tours-android

Cardboard mode is weird inside the app, but the cardboard mode in the browser works fine. The tour actually works fine on the phone gap app its just the cardboard mode. Have you tried putting krpano inside phonegap?

reza_shnia

Trainee

Posts: 75

Occupation: krpano freelancer || creating ideas & coding them || krpano developer

  • Send private message

7

Wednesday, August 1st 2018, 2:48pm

Yes, I use PhoneGap and I don't have any problem!
did you test the XML code?

milotimbol

Intermediate

  • "milotimbol" started this thread

Posts: 220

Location: Philippines

Occupation: Software Developer

  • Send private message

8

Thursday, August 2nd 2018, 3:48pm

Yes, that code is already in vtourskin.xml.

this code, is in vtourskin.xml line 90

Source code

1
<krpano stagescale="calc:stagescale * 2" if="stagescale LT 1.0" devices="mobile" />


So the only thing I could try is the viewport code.

Source code

1
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, viewport-fit=cover"/>


when I tried your viewport code, the results is very small icons, buttons.



It does fix cardboard mode but it makes all the buttons super small that I can barely click on the cardboard icon.

The default viewport code from tour.html,

Source code

1
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, viewport-fit=cover" />


is ok as long as you dont switch to cardboard mode. Not really sure how to proceed.

9

Friday, March 1st 2019, 11:11am

hi! I have the same problem, any chance to fix it?