SOLUTION: Running tours offline on Android
Posted: Fri Sep 27, 2019 8:28 am
Hi guys,
I have seen a lot of requests for running tours offline and some of the solutions offered require a purchase of a micro USB Flash(or a normal USB flash and a special cable)) and using Firefox only.
I was looking for it as my client suddenly demanded an offline solution. I am trying to offer them 360appmaker but it will cost them as much as their tour. Just in case they reject the custom branded app I have found a simple solution to do it on Android devices.
You will need the app called "KWS -Android websever" https://play.google.com/store/apps/deta ... s&hl=en_AU
Download it and install the app to your android device, add a path to your pano2VR output folder(Home directory setting in the app settings) and click "start the server" in the app. Then pick up from a server startup screen what your IP address is and a port number and that's what you need to use as URL to access your tour through a browser.
Below is a setup screen where you need to enter a home directory path
https://lh3.googleusercontent.com/7ylNt ... 66-h625-rw
And further below is a screen where you can see your IP and your web server port number.
https://lh3.googleusercontent.com/lT4s_ ... 66-h625-rw
You will see this screen after you click the "Start Sever" button located at the bottom of the app.
For example if it had been your screen then you would have accessed and run the tour using http://192.168.1.10:8080 in a browser
You can change your port in settings to 80 if you want to. Then assuming your IP is 192.168.1.10 your URL will be http://192.168.1.10 or http://192.168.1.10:80
If you are not connected to any network(wifi and mobile data are both off) the app will give "localhost" instead of an IP. In this case use http://localhost:8080 for port 8080
or just
http://localhost or http://localhost:80 if you set your port to 80.
The biggest challenge with this web server app is that it does not let you pick up a home directory by navigating through the file system. You either need to type it or paste it from clipboard.
If you are sure you know a full path to your output folder just type it.
If you do not I guess the best will be to use some file manager app and go to that folder through the file manager app and find a way to copy it to clipboard.
With some file manager apps is not so easy to find how you can copy the path to clipboard.
I am using File Manager app(https://play.google.com/store/apps/deta ... n&hl=en_AU) and that where you need to be creative to find the path and copy it to it.
Here is a screenshot from the app
https://lh3.googleusercontent.com/xuMMQ ... 66-h625-rw
Assuming "Documents" is where all your output pano2VR files are located click on the word "Documents" at the top and it will pop up another dialog with all information. That's where you can copy the path to your folder into Clipboard. Not sure what told me that I could see the path that way, probably just a coincidence that I tapped it and found what I was looking for.
A bit of FAQ:
Where can I store my output files on Android?
I am pretty sure anywhere on Android where you can save your output files.
I used DCIM on my phone, created a folder called "tours" in it and transferred all output files in it from my PC.
So in my case I navigated to the "tours" folder in the File manager app until "tours" displayed at the top like "Documents" in the example before. So in order to find a path I clicked on "tours" at the top and copied the path from the popup dialog. Then I pasted the path from clipboard into Home directory settings in the KWS server app.
What browser will it work with?
There shouldn't be any limitations as it is a web sever, just a tiny one that runs on your android device. I have tested at least in Firefox, Chrome and Samsung Internet browser. No problems with either of them.
If I am connected to a local network and KWS gives me a lan ip address does it mean I can access my tour from a device different than where the KWS server is running ?
If there is nothing blocking the port you use for your KWS server locally you will be able to open it even from Ipad as long as the Ipad is on the same LAN as your android with KWS.
Can I use it to test my tour locally for compatibility with different devices?
You can and it may be the least problematic way as you do no need to get any 3rd party hosting involved. Like in a previous question when I mention Ipad you can connect all testing devices to the same wifi including the android device with the KWS server running and then access your tour from any device using the IP and the port number assigned by KWS to its web server.
Can I use another Android app to run a web server on my android device
You can try but I have found that some of them do not work. I have started with the app called "Tiny web server" but for some unknown reason it cannot load pano.xml file. I would suggest to stick to the one that is tested but feel free to test other web server apps.
Can I install a web server on Ipad?
As far as I know you cannot. However I am not good with apple devices. I have checked with my friend who is currently in IT position(I left IT 10 years ago) and he is pretty sure that there are no apps that can run a web server on Ipad.
I have a similar solution for Windows 7/8/10 tablets(non RT) with just a difference that you need to use built in IIS service which includes Microsoft
Even though it may be too much trouble to use it comparing to a desktop package that you can generate in Pano2VR and run on Windows machines.
I have seen a lot of requests for running tours offline and some of the solutions offered require a purchase of a micro USB Flash(or a normal USB flash and a special cable)) and using Firefox only.
I was looking for it as my client suddenly demanded an offline solution. I am trying to offer them 360appmaker but it will cost them as much as their tour. Just in case they reject the custom branded app I have found a simple solution to do it on Android devices.
You will need the app called "KWS -Android websever" https://play.google.com/store/apps/deta ... s&hl=en_AU
Download it and install the app to your android device, add a path to your pano2VR output folder(Home directory setting in the app settings) and click "start the server" in the app. Then pick up from a server startup screen what your IP address is and a port number and that's what you need to use as URL to access your tour through a browser.
Below is a setup screen where you need to enter a home directory path
https://lh3.googleusercontent.com/7ylNt ... 66-h625-rw
And further below is a screen where you can see your IP and your web server port number.
https://lh3.googleusercontent.com/lT4s_ ... 66-h625-rw
You will see this screen after you click the "Start Sever" button located at the bottom of the app.
For example if it had been your screen then you would have accessed and run the tour using http://192.168.1.10:8080 in a browser
You can change your port in settings to 80 if you want to. Then assuming your IP is 192.168.1.10 your URL will be http://192.168.1.10 or http://192.168.1.10:80
If you are not connected to any network(wifi and mobile data are both off) the app will give "localhost" instead of an IP. In this case use http://localhost:8080 for port 8080
or just
http://localhost or http://localhost:80 if you set your port to 80.
The biggest challenge with this web server app is that it does not let you pick up a home directory by navigating through the file system. You either need to type it or paste it from clipboard.
If you are sure you know a full path to your output folder just type it.
If you do not I guess the best will be to use some file manager app and go to that folder through the file manager app and find a way to copy it to clipboard.
With some file manager apps is not so easy to find how you can copy the path to clipboard.
I am using File Manager app(https://play.google.com/store/apps/deta ... n&hl=en_AU) and that where you need to be creative to find the path and copy it to it.
Here is a screenshot from the app
https://lh3.googleusercontent.com/xuMMQ ... 66-h625-rw
Assuming "Documents" is where all your output pano2VR files are located click on the word "Documents" at the top and it will pop up another dialog with all information. That's where you can copy the path to your folder into Clipboard. Not sure what told me that I could see the path that way, probably just a coincidence that I tapped it and found what I was looking for.
A bit of FAQ:
Where can I store my output files on Android?
I am pretty sure anywhere on Android where you can save your output files.
I used DCIM on my phone, created a folder called "tours" in it and transferred all output files in it from my PC.
So in my case I navigated to the "tours" folder in the File manager app until "tours" displayed at the top like "Documents" in the example before. So in order to find a path I clicked on "tours" at the top and copied the path from the popup dialog. Then I pasted the path from clipboard into Home directory settings in the KWS server app.
What browser will it work with?
There shouldn't be any limitations as it is a web sever, just a tiny one that runs on your android device. I have tested at least in Firefox, Chrome and Samsung Internet browser. No problems with either of them.
If I am connected to a local network and KWS gives me a lan ip address does it mean I can access my tour from a device different than where the KWS server is running ?
If there is nothing blocking the port you use for your KWS server locally you will be able to open it even from Ipad as long as the Ipad is on the same LAN as your android with KWS.
Can I use it to test my tour locally for compatibility with different devices?
You can and it may be the least problematic way as you do no need to get any 3rd party hosting involved. Like in a previous question when I mention Ipad you can connect all testing devices to the same wifi including the android device with the KWS server running and then access your tour from any device using the IP and the port number assigned by KWS to its web server.
Can I use another Android app to run a web server on my android device
You can try but I have found that some of them do not work. I have started with the app called "Tiny web server" but for some unknown reason it cannot load pano.xml file. I would suggest to stick to the one that is tested but feel free to test other web server apps.
Can I install a web server on Ipad?
As far as I know you cannot. However I am not good with apple devices. I have checked with my friend who is currently in IT position(I left IT 10 years ago) and he is pretty sure that there are no apps that can run a web server on Ipad.
I have a similar solution for Windows 7/8/10 tablets(non RT) with just a difference that you need to use built in IIS service which includes Microsoft
Even though it may be too much trouble to use it comparing to a desktop package that you can generate in Pano2VR and run on Windows machines.